LinuxQuestions.org
Register a domain and help support LQ
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 01-08-2009, 06:29 AM   #1
mmahulo
Member
 
Registered: Nov 2008
Posts: 31

Rep: Reputation: 15
Being new to linx and scripting is no easy chore...


Hi

I know I have to attempt something so that I can be assisted but on this one I don't know how to even start. Please have mercy...

Write a shell script that takes a uid as an argument and prints out that personís name,
home directory, shell and group number. Print out the name of the group corresponding
to the group number, and other groups that person may belong to. (groups,
awk, cut. Also look at /etc/passwd and /etc/groups).
 
Old 01-08-2009, 07:04 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
The last sentence is a very good hint. There are man pages for files as well as programs, including "man 5 passwd" and "man 5 group".

You have obvious stated a homework question, and you can't expect people to do the problem for you. You might want to google for the "rute guide" for help getting started learning bash scripting. The "SAG Guide" on the www.tldp.org website to learn about how linux works, including the fields of /etc/passwd, /etc/group and /etc/shadow.
 
Old 01-08-2009, 07:17 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
This is the max we can help you for your homework...

http://letmegooglethatforyou.com/?q=...ripting+guide+
 
Old 01-08-2009, 08:52 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
The above advice is more help than you will typically get from a "cut and paste" homework question. I see from your posting history that this is not your pattern---in the future, always try to show us what you have tried and ask more specific questions. In this case, for example, the question might be:
"I looked in /etc/passwd and could not figure out where the UID is."
 
  


Reply


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
Easy scripting question - tar tejama Linux - Newbie 3 02-13-2008 01:08 PM
LXer: Shell Scripting, oooh...its easy LXer Syndicated Linux News 0 11-27-2006 10:54 AM
Why is installing a program in Linux such a chore? Cinematography General 47 05-03-2005 07:05 PM
Another easy Bourne Shell Scripting question WinterSt Programming 7 09-02-2004 08:41 PM
Scripting problems - I'm sure this should be easy! webamoeba Linux - Newbie 6 02-03-2004 10:58 AM


All times are GMT -5. The time now is 09:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration