to get the results you're looking for wrap quotes around it:
I'd imagine that if this is in a script, it may be the case that it's preferable to echo the results of an earlier grep than to waste resources grepping the same thing repeatedly...
Last edited by DeCoTwc; 09-19-2008 at 11:33 PM..
Reason: fixed code tag
Hi guys,
I have a simple question, I want to store the output of the following command:
As you can see it is running all the time, and we get a new line every 3sec.
I just want to store these new lines into a single variable, so I can use it into a script.
To clear the screen, and... (4 Replies)
Hi,
I have a perl script which prints the epoch value of given date.
I want to use its output in a shell script.Can someone suggest me how to do it.
Thanks and Regards
Jyothi (4 Replies)
Hi guys - I use this script below to search for files that are of todays date. It also informs if the file doesnt exist or is old.
I am trying to make the script inform of the errors in the "begining" of the output email. Such as all errors are grouped together.
I am using the following... (1 Reply)
Hi All,
Below is the shell script for which desired output is required:
Shell script:
#!/bin/bash
. /oracle/TEST/db/tech_st/11.1.0/TEST_<hostname>.env
sqlplus /nolog << EOF
connect / as sysdba
spool /home/oracle/db_output.log
@lockwait.sql
prompt Database Locks
... (1 Reply)
how to duplicate an output from a shell command?
for example:
`date` will give the current date to the console.
I want this to be displayed in console and also parallely store it in file or variable.
user1@solaris4:~> date
Tue Feb 28 17:48:31 EST 2012
user1@solaris4:~> date > file
... (3 Replies)
Hello guys.
about two weeks ago i had a question about customizing output and thanks to you guys i could solve it.
now i have a similar question but this time its little complex.
this is my output:
-------------------+--------------------+---------+---------
ias-component | process-type ... (3 Replies)
Hi Team -
I"m very new to Shell Scripting so I have a rather novice question. My forte is Windows Batch Scripting so I was just wondering what the Shell Script equivalent is to the DOS command %~n?
%~n is a DOS variable that dispayed the script name.
For instance (in DOS):
REM... (11 Replies)
Hi Guys,
I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
I'm trying to create a shell script that takes a awk script that I wrote and a filename as an argument. I was able to get that done but I'm having trouble figuring out how to keep the header of the output at the top but sort the rest of the rows alphabetically. This is what I have now but it is... (1 Reply)
Discussion started by: Eric7giants
1 Replies
LEARN ABOUT XFREE86
zgrep
ZGREP(1) General Commands Manual ZGREP(1)NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)ZGREP(1)