I am trying to run the following code from a script file but it complains that syntax of (both instances of) grep is wrong.
When I copy and paste it to the terminal, it is OK. Any idea what the problem might be?
set i = `grep -c #define flags.h`
while ($i>20)
@ i--
my func (`cat... (4 Replies)
Hi
Could you please tell me why the following grep does not match the string?
> echo ' 1661 Rows not loaded because all WHEN clauses were failed.' | grep 'Row* not*WHEN*'
Thanks
gnmike (2 Replies)
grep -e doesn't work in Soalris.
Same script with grep -e worked on AIX/HP/LINUX..
I would like to search a list of patterns on "log.txt" like ...
grep -e FATAL -e ERROR log.txt
I get the error message as
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . . (3 Replies)
I am trying to find only those entries where 7018 and another number appear in the end of the line.
7018 2828 1423 2351
7018 2828 14887
2828 7018 1222
123 7018 1487
I am looking for a way to generate only the last two lines. I was trying to do just "grep '7018{1,5}" but it does not... (5 Replies)
Hi there,
the following script doesn't work. the first part works, then the second 'grep' fails with ': not found'. However, if I take out the second part (starting with the grep command) and put in a seperate script, it works.
everyone know what's wrong here? no two 'grep' in one script, that... (2 Replies)
Hi all,
I need some help. my shell script doesn't work especially in the loop.
#!/bin/sh -xv
export ORA_ADMIN=/oracle/home/admin
export ORACLE_SID=ORA_SID
cat ${ORA_ADMIN}/param_alert_log.ora | while read MSG
do
#echo $MSG
#echo "tail -400... (8 Replies)
This is my first script and I wont get it working.. sorry for being a total noob but here it is:
#./bin/sh -x
echo "1:st argument = $1";
echo "2:nd argument = $2";
grep "$1" "$2"
In the terminal I write, for example, su.sh sausage sausage.txt
Also tried su.sh "sausage" "sausage.txt" but... (2 Replies)
Hello again,
Am having an issue now with getting a simple grep command to work within a function..
The function is as below...
function findRecord() {
output=grep "001" recordDatabase
echo $output
}
At the moment the "001"... (3 Replies)
Hello.
I have a question as to why my grep command does not seem to be working.
grep -c '^?*' ~
grep -c '^.*' ~
I wanted to count the number of files starting with the letter K and have some letters after that. I have such files in my home directory. However, the output is 0. So, I have no... (2 Replies)
Hello,
First of all, I'd like to say hello to all members of forum.
Can You please help me with the matter described below?
I am trying to fetch a data from the file to variable, I am doing this using below script:
returned=`tail -50 SapLogs.log | grep -i -E "Error|"`
echo $returned
... (2 Replies)