09-26-2008
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone,
Im trying to write a Shell script that basically creates a set of files based on a file with many records. For example if a file called dummy has the following content:
a.txt
1st line of a's text file
2nd line of a's text file
3rd line of a's text file
b.txt
1st line of b's... (8 Replies)
Discussion started by: nbvcxzdz
8 Replies
2. Shell Programming and Scripting
BACKGROUND:
I am using Solaris 10. Some of my boxes have gnu grep and I can use -A and -B flags on those. However, the solaris flavor of grep won't use the flags -A or -B. And some of my boxes won't be getting gnu grep.
Should I try using perl, awk, or sed?
Actual PROBLEM: I am... (7 Replies)
Discussion started by: el_guero
7 Replies
3. Shell Programming and Scripting
Hello
I do want to write a script which will check any errors say "-error" in the log file then have to send email to the concern person . And the concern person will correct the error .
Next time if the script runs eventhough the error has been corrected it will ... (1 Reply)
Discussion started by: Krishnaramjis
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I'm trying to save the wc from a grep command in my unix script and then later in my script I try to reference the variable but I have no luck. Any help is greatly appreciated!
--------------------
set xTest = 'grep -i lisa daily.log'
if ;
then
echo "TEST" >> daily.log
fi... (6 Replies)
Discussion started by: lisa_0801
6 Replies
5. Shell Programming and Scripting
Hey there, newbie question :
echo "::kmastat" | /usr/bin/mdb -k | grep Total | grep "kmem_*"
Total 17326080 432853 0
Total 426508288 65458 0
Total 704757760 1572001732 0
Total ... (11 Replies)
Discussion started by: shriyer
11 Replies
6. Shell Programming and Scripting
I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts.
Here is my script
#!/bin/csh -f
source .orapass
set user = $USER
set pass = $PASS
cd /opt/data/scripts
echo... (2 Replies)
Discussion started by: allinshell99
2 Replies
7. Shell Programming and Scripting
Hi guys - below is my script that is checking for current file, size and timestamp.
However I added a "grep" feature in it (line in red), but not getting the desired result.
I am trying to acheive in output:
1. Show me the file name, timestamp, size and grep'ed words
It would be a... (2 Replies)
Discussion started by: DallasT
2 Replies
8. Shell Programming and Scripting
hi guys
very new to this game so excuse my ignorance. I need to create a script that simply greps for a text string and then outputs a message depending on whether the text string is there or not. The script I have setup is below, but whenever I run it I get the following error:
... (5 Replies)
Discussion started by: ap2112
5 Replies
9. Shell Programming and Scripting
Hello,
I am a new Unix user and new to shell programming. I am working on a script to go through a log file and find the text error:
grep -i 'error' monplus.mplog
if I find the text error in the log file I would like to echo a message to the operator staing there is an error
I am currently... (2 Replies)
Discussion started by: dtracy01
2 Replies
10. Shell Programming and Scripting
Hi Guys,
I want to grep the text/code value in my shell script.
Sample Code:-H "fjkldj skdfjk2342 kj s2323"
Here, the code value is in double quotes after -H. This value I have to pic and put it in variable to pass a parameter value.
Can any one help me on this!
Thanks in... (13 Replies)
Discussion started by: lakshmanraok
13 Replies
LEARN ABOUT NETBSD
zegrep
ZGREP(1) BSD General Commands Manual ZGREP(1)
NAME
zgrep, zegrep, zfgrep -- print lines matching a pattern in gzip-compressed files
SYNOPSIS
zgrep [grep-flags] [--] pattern [files ...]
zegrep [grep-flags] [--] pattern [file ...]
zfgrep [grep-flags] [--] pattern [file ...]
DESCRIPTION
zgrep runs grep(1) on files or stdin, if no files argument is given, after decompressing them with zcat(1).
The grep-flags and pattern arguments are passed on to grep(1). If an -e flag is found in the grep-flags, zgrep will not look for a pattern
argument.
zegrep calls egrep(1), while zfgrep calls fgrep(1).
EXIT STATUS
In case of missing arguments or missing pattern, 1 will be returned, otherwise 0.
SEE ALSO
egrep(1), fgrep(1), grep(1), gzip(1), zcat(1)
AUTHORS
Thomas Klausner <wiz@NetBSD.org>
BSD
December 28, 2003 BSD