cat /etc/passwd | cut -d ":" -f1
awk -F: '{ print $1 }' /etc/passwd
orCode:cat /etc/passwd | cut -d ":" -f1
Code:awk -F: '{ print $1 }' /etc/passwd
cat /etc/passwd | cut -d ":" -f1 > file1.txt
awk -F: '{ print $1 }' /etc/passwd > file2.txt
Can you give an example of what you would like to see and you want all the users in a different text file?
#!/bin/bash
mkdir users
for user in $(awk -F: '{ print $1 }' /etc/passwd)
do
grep $user /etc/passwd > users/$user.txt
done