LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-01-2012, 04:24 PM   #1
tuts73
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

Thanks
 
Old 04-01-2012, 06:08 PM   #2
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 893

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, 06:10 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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


Reply



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 09:46 AM
Please help! simple bash script Juanmadrid Linux - Newbie 7 08-11-2011 09:56 AM
Need simple bash script help rickenbacherus Linux - General 1 11-01-2006 02:44 AM
Simple bash script Soulful93 Programming 1 06-04-2005 07:26 PM
Help with simple bash script - please tw001_tw Linux - Software 5 12-19-2004 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:15 AM.

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