This is the sample of a data file that I have. It has 10 columns:
0,285,1,2,5,285,1,2,5,0
0,168,1,1,61,168,1,1,61,1512
0,102,3,1,60,102,3,1,60,1525
0,282,3,3,2,282,3,3,2,1503
0,167,3,4,10,167,3,1,24,1472
0,101,1,0,0,101,1,0,0,0
0,263,3,2,0,263,3,2,0,1470
0,245,2,1,50,245,2,1,50,1425... (15 Replies)
I have a data file that is arranged like this:
Marketing Ranjit Singh Eagles Dean Johnson FULL
Marketing Ken Whillans Eagles Karen Thompson FULL
Sales Peter RobertsonGolden TigersRich Gardener PART
President Sandeep Jain Wimps Ken Whillans CONT... (7 Replies)
hi everyone,
I am looking for an easy way to extract columns from a text file based on a regular expression, kind of like grep but searching and returning columns instead.
for example, suppose i have the following file, 'file.txt':
A B C D B
1 2 3 4 5
6 7 8 9 0
5 6 7 8 9
2 3 8 9 0
I... (6 Replies)
Hi,
I need to perform a grep from a file, but ignore any results from the first column.
For simplicity I have changed the actual data, but for arguments sake, I have a file that reads:
MONACO Monaco ASMonaco
MANUTD ManUtd ManchesterUnited
NEWCAS NewcastleUnited
NAC000 NAC ... (5 Replies)
Hi have a large spreadsheet which has 4 columns
APM00111803814 server_2 96085 Corp IT Desktop and Apps
APM00111803814 server_2 96085 Corp IT Desktop and Apps
APM00111803814 server_2 96034 Storage Mgmt Team
APM00111803814 server_2 96152 GWP... (6 Replies)
Trying to do a grep -v on a value in the 2nd column of text. So if the word apple appears in a line in the 2nd column, it would not show up when the file was cat. Seems like a simple enough operation but I just can't figure it out. Any help would be appreciated. Thanks in advance.
Are apples... (4 Replies)
Hello All
I have an input file with data below. I would like to grep and display the data where 3rd column contains string or at least one character. Kindly please help me with this!
Input:
tjfa3|zznpou|224fdd.34.ff3.35 |Tiv|Otj|1
fgduul7|zznikj| ... (7 Replies)
I have a file with two columns separated by white space.
Dog Cat
fido sneaky
dopey poptart
ears whisker
barky herd
Trying to list the words under the column named Dog. Tried a few variations of awk but can't... (4 Replies)
Gents
Is it possible to update the code to get the desired output files from the input list. I called variable to the first column.
I need to consider the first column as key to grep the values in the second column according to the desired request.
input list
(attached )
output1
... (12 Replies)
Discussion started by: jiam912
12 Replies
LEARN ABOUT LINUX
zegrep
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)