Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-01-2012, 05:24 PM   #1
LQ Newbie
Registered: Apr 2012
Posts: 7

Rep: Reputation: Disabled
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

Old 04-01-2012, 07:08 PM   #2
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 889

Rep: Reputation: 119Reputation: 119
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
Old 04-01-2012, 07:10 PM   #3
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
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?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get some bash scripts into a simple bash script with some echo and if statement. y0_gesh Programming 3 03-01-2012 10:46 AM
Please help! simple bash script Juanmadrid Linux - Newbie 7 08-11-2011 10:56 AM
Need simple bash script help rickenbacherus Linux - General 1 11-01-2006 03:44 AM
Simple bash script Soulful93 Programming 1 06-04-2005 08:26 PM
Help with simple bash script - please tw001_tw Linux - Software 5 12-19-2004 10:02 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration