10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: jedzio
2 Replies
2. Shell Programming and Scripting
I am using the code below to grep through a list of files (TEMPFILE) and look for rsync, rdist, rsh, ftp, etc. in each file. Do a count of each, and output that to a logfile.
This works great in Linux, but not at all in Solaris because the EGREP -o option does not exist.
Anyone have an idea... (5 Replies)
Discussion started by: nitrobass24
5 Replies
3. Shell Programming and Scripting
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)
Discussion started by: U_C_Dispatj
3 Replies
4. Solaris
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)
Discussion started by: Prantare
2 Replies
5. Shell Programming and Scripting
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)
Discussion started by: sidobre
8 Replies
6. Shell Programming and Scripting
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)
Discussion started by: monkey77
2 Replies
7. UNIX for Dummies Questions & Answers
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)
Discussion started by: Legend986
5 Replies
8. Solaris
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)
Discussion started by: jmkraja
3 Replies
9. UNIX for Dummies Questions & Answers
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)
Discussion started by: GNMIKE
2 Replies
10. Shell Programming and Scripting
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)
Discussion started by: barisgultekin
4 Replies