tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: edge <eds5 () idt ! net>
To: tru64-unix-managers
Subject: SUMMARY:awking out a character
Date: Fri, 31 Oct 1997 00:13:59 +0000	[thread overview]
Message-ID: <96078618110756.tru64-unix-managers.marc@archive.invalid> (raw)

Wow - Thanks to the 20+ who responded!
Although I feel like somewhat of a clod, due to the fact that I forgot about the cut command.

Here are a selected few responses:

1) cut -c 1 /etc/passwd

2) awk '{ print substr($0, 1, 1) }'

3) cat /etc/passwd | cut -b 1,1 | while read FirstInitial
do
echo Do anything with "$FirstInitial"
done


ORIGINAL MESSAGE:
Was wondering if any of you could inform me of a quick way to read through a list of user names and just grab the first char of the login so as to use it in a automated script in order to edit/traverse C2 auth files.  Perhaps awk can do this?  Obviously C2 security stores files in /tcb/files/auth/first initial login name and you must edit those user profiles individually on occasion.

                 reply	other threads:[~1997-10-31  0:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox