Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grep for string question.

Status
Not open for further replies.

galger

MIS
Jan 16, 2002
79
US
Simple grep of file...

grep "^*" file

file~~~~~
pazooc1:\
:.retry.stwait=00.00.3:\
:cortr.sattpts=3:\
:cn.retry.ltwat=00.10.00:\
:cn.rety.ltattempts=6:\
:tcpax.time.toait=0:\
:runsep.max.time.to.wit=0:\
systemzoo:\
:dkdkd
:sksdk
~~~~~~~~

grep "^*" file

This should pick up these two lines below in the file

pazooc1:\
systemzoo:\

Am I not doing this correctly.
Let me know. thanks.



 
Try this:
grep "^[a-z]" file

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi

Code:
grep -v "^ " file

Feherke.
http:/rootshell.be/~feherke/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top