* SUMMARY:awking out a character
@ 1997-10-31 0:13 edge
0 siblings, 0 replies; only message in thread
From: edge @ 1997-10-31 0:13 UTC (permalink / raw)
To: tru64-unix-managers
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-10-31 0:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-31 0:13 SUMMARY:awking out a character edge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox