01-17-2008
Hi ennstate
Thanks again for your nice comments.
I have checked the input file, and it does include space on it.
So, I think we need to change the logic as you mentioned before.
Plus, I need the output file, to be Tabbed spaced between each columns inside the file.
To make it easy for other applications. Is it possible..!!
Any ways thank you again.
Amm
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
how to search all occurance of keyword in current directory files and sub folder's files also using grep command.
thanks (2 Replies)
Discussion started by: avadhani
2 Replies
2. UNIX for Advanced & Expert Users
I am doing "ps -f" to see my process.
but I get lines that one of it represents the ps command itself.
I want to grep it out using -v flag, but than I get another process that belongs to the GREP itself :
I would like to exclude
# ps -f
UID PID PPID C STIME TTY TIME CMD... (2 Replies)
Discussion started by: yamsin789
2 Replies
3. Shell Programming and Scripting
Hi,
Can anybody explain me about the below mentioned code.
grep "^" $FILENAME | cut -c 1-8,84- | awk '{ if (!($2+$3)) printf $1 "," }' >$TEMP_FILENAME
Thanks in advance. (3 Replies)
Discussion started by: Kattoor
3 Replies
4. Shell Programming and Scripting
i want to search in the current directory all the files that contain one word for example "hello"
i want to achieve it with the grep command but not with the grep * (2 Replies)
Discussion started by: aintour
2 Replies
5. Shell Programming and Scripting
Hi,
I Want to grep the 500th character of a line in a file. please help on this.
Thanks in advance (7 Replies)
Discussion started by: raghulshekar
7 Replies
6. UNIX for Dummies Questions & Answers
I need to find the word "who" in a file but only that word. For instance I don't want it to find the word "whoever." Any suggestions? (2 Replies)
Discussion started by: brooksie91
2 Replies
7. Shell Programming and Scripting
Hi, im taking an entry Unix class, and as part of my lab assignment I have to copy all files in the /home/david/lab3 directory that have the file extension .save to your lab3/temp directory. I'm having trouble getting the grep to do anything worth while
I've been trying to do:
cp... (6 Replies)
Discussion started by: Critical jeff
6 Replies
8. Shell Programming and Scripting
i have a file which lists the following
T2323
T3445
T67666,T6534,T4546
T7878
i need to extract the numeric part only(ie,without T).
i tried this script
awk '{print substr($0,2,length($0))}' pmt2.txtOutput
2323
3445
67666,T6534,T4546as u can see the numbers coming after "," remains the... (2 Replies)
Discussion started by: born
2 Replies
9. Shell Programming and Scripting
i have the following lines
T2345
T3435 - bugfixed and running
T5654 fixed and committed
T34541:- fixed and committed
i need to extract only the T part (eg:T2345) ,ie i dont want any special characters after it.
i have been trying with grep and egrep but with no luck.
pls help (11 Replies)
Discussion started by: born
11 Replies
10. Shell Programming and Scripting
Hello,
I am running below command as root user
#nodetool cfstats tests | grep "Memtable switch count"
Memtable switch count: 12
Where as when I try to run same command as another user it gives different result.
#su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
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)