Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 2 of 2
Search took 0.00 seconds.
Search: Posts Made By: nuvox
Forum: Bash / Shell Scripting May 25th, 2008, 9:29 AM
Replies: 3
Views: 508
Posted By nuvox
Re: if condition and grep

okay, figured it out.
grep_output=`grep <word> <file>`
if [ "$grep_output" == "" ]; then
echo "not found";
else
echo "found";
fi
Forum: Bash / Shell Scripting May 25th, 2008, 7:39 AM
Replies: 3
Views: 508
Posted By nuvox
if condition and grep

hey all

im trying to write a script, need some help

concept goes like this: i want to grep a file for a word/phrase, and depending on grep's output (basically, any output at all = found, NULL = not...
Showing results 1 to 2 of 2

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:19 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC