LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Simple bash script (https://www.linuxquestions.org/questions/linux-newbie-8/simple-bash-script-937584/)

tuts73 04-01-2012 04:24 PM

Simple bash script
 
Hi all - just wondering if you could help with a simple bash script...i want to list all user account on a linux system

Thanks

jmc1987 04-01-2012 06:08 PM

I could give you a perl script to do it but thats not what you request.

I haven't studied to much with bash scripting all though I'm sure with a little research this would be a fairly simple task.

Are you just trying to see all the accounts?

you could just look at /etc/passwd such as

# less /etc/passwd

Tinkster 04-01-2012 06:10 PM

Indeed .... "list all user account" is not very specific, and in its simplest
incarnation certainly doesn't require a bash script.

What exactly do you wish to list, what is the expected output?



Cheers,
Tink


All times are GMT -5. The time now is 12:54 PM.