09-18-2006
grep data from header of files
Hello
I want to grep data from header of the files . The header conatins data in this format .
# $maint$ test1
# $product$ TTT
I want to store maint name and product name with path of file .
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
Pls help me i need script for counting number of fails from file .
The file contains number of failuer records . (2 Replies)
Discussion started by: getdpg
2 Replies
2. Shell Programming and Scripting
Hi, i have number of files in a directory to be processed. the problem is some of the files does not have a header and the process is giving an error of no header found.
example of good file :
file1
HDR|20080803233401
record 1
record 2
TRA|2
example of a bad file in the same dir
... (6 Replies)
Discussion started by: sitaldip
6 Replies
3. Programming
hi all,
In an mp3 file , data is arranged in sequence of header and data ,how to retrieve data between two headers. Is the data between two headers fixed? because as per theory it says 1152 samples will be there , but dont knw how many bits one sample correspond to?
it would help if any c... (2 Replies)
Discussion started by: shashi
2 Replies
4. Shell Programming and Scripting
Hi,
I have a file with multiple tab delimited columns and I would like to have the average of each column:
Iteration Tree No Lh HMean
1000 1 -78.834717 -78.834717
1100 1 -77.991031 -78.624046
1200 1 -79.416055 -78.761861
1300 1 -79.280494 -78.968099
1400 1 -82.846275 -80.808696 ... (4 Replies)
Discussion started by: mikey11415
4 Replies
5. UNIX for Dummies Questions & Answers
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies
6. Shell Programming and Scripting
Hi, Great minds, I have some files, in fact header files, of CTD profiler, I tried a lot C programming, could not get output as I was expected, because my programming skills are very poor, finally, joined unix forum with the hope that, I may get what I want, from you people,
Here I have attached... (17 Replies)
Discussion started by: nex_asp
17 Replies
7. UNIX for Dummies Questions & Answers
How would I do the following :
Records other than ”ATOM”,”CONNECT”, ”HETATM”, ”TER” and ”END” are considered header records which describe the metadata about the molecule. Use grep to generate the header.
I have this chemistry database. On the attachment. But I am not sure how to use... (4 Replies)
Discussion started by: homeylova223
4 Replies
8. Shell Programming and Scripting
Hi Everyone,
Im currently using the below code to pull data from a large CSV file and put it into smaller files with just the data associated with the number that I "grep".
grep 'M053' test.csv > test053.csv
Is there a way that I can use grep to run through my file like the example below... (6 Replies)
Discussion started by: TheStruggle
6 Replies
9. Shell Programming and Scripting
HI Guys,
File A.txt
UID,HD1,HD2,HD3,HD4
1,2,33,44,55
2,10,14,15,16
File B.txt
UID
HD1
HD4
A.txt B.txt >>>Output.txt
UID,HD1,HD4
1,2,55
2,10,16 (11 Replies)
Discussion started by: pareshkp
11 Replies
10. UNIX for Beginners Questions & Answers
Hi Team,
Could you please help me with the below scenario.
I have a file which is in the below format.
Zipcode,001,001f,002,002f,003,003f,004,004f,005,005f,006,006f,007,007f
0050, ,0, ,0, ,0, ,1,*,7, ,7, ,7
0060, ,0, ,0, ,7, ,0,*,7, ,0, ,0
Would need the output as below.
First field... (1 Reply)
Discussion started by: saj
1 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)