Computing.Net > Forums > Linux > scripting question

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

scripting question

Reply to Message Icon

Name: jane79
Date: December 29, 2003 at 09:34:43 Pacific
OS: redhat 8
CPU/Ram: p4,512k
Comment:

Does anyone know the correct format to execute grep command as below?

In my case (this is a part of my script):

#cat file.txt
abc-

if i do

#grep '\<abc-\>' file.txt
no output appeared.

but if i do

#grep '\<abc\>' file.txt
output is "abc-"

I need to use
#grep '\<abc-\>' file.txt
and need the output in order to make my script runs correctly.

Any idea, advice, helps are really much appreciated!



Sponsored Link
Ads by Google

Response Number 1
Name: heart_debian
Date: December 29, 2003 at 10:40:14 Pacific
Reply:

If you do:
#grep "abc-" file.txt
output is "abc-"



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: scripting question

Shell Script Question www.computing.net/answers/linux/shell-script-question/15096.html

Easy shell script question? www.computing.net/answers/linux/easy-shell-script-question/19758.html

scripting question (mozilla) www.computing.net/answers/linux/scripting-question-mozilla/26788.html