LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-31-2003, 04:19 PM   #1
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Rep: Reputation: 30
bash - read from file question


i need to make a script that creates users with more special fetures. My question is how can I search a file for a specific text (Ex: /etc/passwd for a specific user)
THX in advance
 
Old 03-31-2003, 04:22 PM   #2
bahamat
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 158

Rep: Reputation: 30
man grep
 
Old 03-31-2003, 04:32 PM   #3
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Original Poster
Rep: Reputation: 30
ok thx
 
Old 03-31-2003, 05:05 PM   #4
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
Quote:
i need to make a script that creates users with more special fetures.
If you're only searching, grep will do fine, but if you need to edit these files (replace, or whatever), you should read up on sed. Awk may also be handy to learn. It all depends on what exactly you're trying to do....
 
Old 04-01-2003, 04:30 AM   #5
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Original Poster
Rep: Reputation: 30
thx i'll look it up
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: read a line from file zokik Linux - General 6 12-10-2008 09:24 AM
Read a line in a txt file with bash orgazmo Programming 5 05-03-2005 07:10 AM
Read a line in a txt file with bash orgazmo Linux - Newbie 3 05-03-2005 04:16 AM
How do I read from a file in BASH? vous Programming 4 03-22-2005 06:51 PM
bash scripting read from file cadj Programming 2 02-29-2004 10:42 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration