SUMMARY:awking out a character

From: edge <eds5_at_idt.net>
Date: Thu, 30 Oct 1997 19:13:59 -0500

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.
Received on Fri Oct 31 1997 - 01:23:43 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT