LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-11-2003, 11:50 PM   #1
Stinger
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Rep: Reputation: 0
Script help please :D


Hey Everyone.

Im new to Linux and i have been asked at work to write a script. Im sort of struggling with it. anyway what i need it to do is:

Have a file called "userlist" and a script called "addusers". the userlist file has the fields "username, password, group, fullname". ok i need this script to read the userlist file (i got that working) but now i need to be able to read the fields and create the users with "username, password, group and full name".

Can anyone steer me in the right direction, any help is very much appreciated.

Thank you so much
 
Old 09-11-2003, 11:54 PM   #2
bbenz3
Member
 
Registered: Feb 2002
Location: Orlando
Distribution: Whatever I feel like at the time I install.
Posts: 284

Rep: Reputation: 30
Learn how to use the grep command. It will allow you to search/parse the file. I am not sure how to create users very well in linux so I can't help much in that area. But if you will separate the fields with certain chars you can then use the grep command to search for those and grab the next set of chars for each field.
 
  


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
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
creating shell script that executes as root regardless of who runs the script? m3kgt Linux - General 13 06-04-2004 10:23 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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