10-10-2012
Hi, My box is aix and the grep does not support -o option. Any other suggestions? ofcourse I can think about awk but not sure how to get the word alone from the output
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to prompt for a response from a user to enter a path
read dest_dir?"Please Enter Directory :"
How do I do this until a valid directory is entered by the user. I can use
to check the existence of the directory. However when I try the following I cannot get it to work.
while ... (2 Replies)
Discussion started by: jerardfjay
2 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
Sorry about this i'm sure this is a very silly question hence an easy answer but:
I'm trying to write a script, part of which I want to check if a directory exists, if it doesn't then create it.
Thanks for your help
Tez (3 Replies)
Discussion started by: tez
3 Replies
3. Shell Programming and Scripting
I'm trying to write a script that identifies whether a directory of the form AWL.????????.IP exists. I have one that exists which is AWL.05301032.IP.
When I test like this: If ]
I get true, but when I test like this:
If ]
Or like this
If ]
Or any other variation of wild cards, I... (4 Replies)
Discussion started by: philplasma
4 Replies
4. UNIX for Dummies Questions & Answers
Hi.
I what to write a make file that inside a target I want to check if a directory exists.
some like:
### make
a:
if ;then
<command 1>
else
<command 2>
fi
### make end
Thanks a lot
---------------------- (2 Replies)
Discussion started by: zivsegal
2 Replies
5. Shell Programming and Scripting
Hi,
I'm writing a shell script that will create a folder if it does not exist yet. Here's the script: (this if statement is inside a while loop)
folderName="Pics"
if ! test -d folderName
then
mkdir $folderName
fi
However, after the folder Pics has been created, every time the... (3 Replies)
Discussion started by: trivektor
3 Replies
6. Shell Programming and Scripting
Hi there
I am trying to make a fuction that looks for a email profile that ends in .$ARGV
here is the code
if (-d "/Users/$ARGV/Library/Thunderbird/Profiles/*.$ARGV") {
print "\n WARNING: Email profile already exits\n\n";
exit;
}
but for some reason it does... (2 Replies)
Discussion started by: ab52
2 Replies
7. Shell Programming and Scripting
Hi,
I am using solaris 10 OS and bash shell.just checking for small code snippet which follows below.
/export/home/vomappservers/spa/common/5.0
/export/home/vomappservers/spa/common/scripts
/export/home/vomappservers/spa/tools
/export/home/vomappservers/spa/scm5.0/SCCS... (5 Replies)
Discussion started by: muraliinfy04
5 Replies
8. Shell Programming and Scripting
Hi Everyone,
I just need a shell script which automatically gives the list of NT IDs mean the Usernames from the list of email ids. We have around 140 users from AMERICAS,ASIAPACIFIC and EMEA User Directories and we have their email ids.For ex. i have email id called naveen-kumar.dasu@hp.com... (7 Replies)
Discussion started by: naveen.dasu
7 Replies
9. Shell Programming and Scripting
Hi guys,
I am beginner trying to learn unix. So any help is welcomed.
My requirement is to check whether is a file exists in a particular directory or not.
The directory path and filename are taken dynamically with user interaction. So the program should continue only if the $filename... (1 Reply)
Discussion started by: maris_markur
1 Replies
10. UNIX for Beginners Questions & Answers
There are some files with suffix dates like abc_20032019.dat abc_17032019.dat
If at least one file exists then perform some operation else exit from execution.
Korn shell
----------------------------------
array=($inputdir/abc*.dat)
If ] ]
then
echo " file exits"
else
echo " file does... (10 Replies)
Discussion started by: Rajesh123
10 Replies
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)