Sponsored Content
Top Forums UNIX for Dummies Questions & Answers grep data from header of files Post 302089287 by getdpg on Monday 18th of September 2006 11:51:30 AM
Old 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

grep data from files

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

grep files without header and move to new dir

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

to find header in Mp3 file and retrieve data

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

Averaging Data From Multiple Columns, Using Header if Possible

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

Merge all csv files in one folder considering only 1 header row and ignoring header of all others

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

Extract header data from one file and combine it with data from another file

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

Using grep to make a header

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

How do I use grep to pull incremental data and send to multiple files?

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

Grep Data Base on Header

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

Pivoting data based on a header field

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
kreg(8) 						      System Manager's Manual							   kreg(8)

NAME
kreg - Maintains the system file that registers kernel layered products SYNOPSIS
/sbin/kreg -d subset [-c NAME] | -l vendor subset path [-c NAME] OPTIONS
Causes the specified layered product to be loaded or deleted from the NAME.list file for the given name in addition to the /usr/sys/conf/.product.list file. Note that the NAME parameter is case sensitive and must exactly match the NAME prefix for the desired NAME.list file. Deletes the entry for the specified layered product when you remove it from the system. Loads the data that controls how to include the layered product in the kernel build process. DESCRIPTION
The kreg command maintains the /usr/sys/conf/.product.list system file, which registers static kernel layered products. The kreg command creates the file if it does not exist. The file enables system utilities or user supplied commands to locate the kernel parts of a layered product, and it provides information about layered products. The kernel tools use the /usr/sys/conf/.product.list file to build a layered product into the kernel. You can use the file to register a static kernel layered product that has been loaded into the system. The file also can be used by the layered product's Software Control Program (SCP), which is called by the setld command. You copy the /usr/sys/conf/.product.list file into the file that is used to extend the kernel configuration files and that has the follow- ing syntax: /usr/sys/conf/NAME.list The NAME variable specifies the system name that also is used in the system configuration file that has the following syntax: /usr/sys/conf/NAME The doconfig command also will copy the /usr/sys/conf/.product.list file. You can use the -c option to load or delete your layered product into a specific NAME.list file as well as the file. This is useful if you want to load your layered product into a specific NAME.list file without requiring the user to either copy the entire file to the NAME.list file or to manually edit the NAME.list file. The kreg command must be invoked from the root (/) directory. The command can be used only for subsets that are loaded by using the setld command. Also, you must be superuser to use the kreg command. FILES
Contains kernel layered product information. Used to extend the kernel configuration files. SEE ALSO
Commands: doconfig(8), setld(8) System Administration kreg(8)
All times are GMT -4. The time now is 04:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy