May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Shell script to get the user list

#!/bin/bash
awk -F: ‘{ print $1 }’ /etc/passwd
awk -F: ‘{ print $1,$5 }’ /etc/passwd
awk -F: ‘{ print $1,$NF }’ /etc/passwd
awk ‘NF >0’
awk -F: -v ‘OFS=—‘ ‘{ print $1,$5 }’ /etc/passwd
exit 0

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>