Multiple headers in a file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Multiple headers in a file
# 8  
Old 04-14-2011
Code:
for file_name in `ls f*.txt`
do
awk 'NR==1 || $1 !~ /^\$/' $file_name > "${file_name}".output
done

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Row bind multiple csv files having different column headers

All, I guess by this time someone asked this kind of question, but sorry I am unable to find after a deep search. Here is my request I have many files out of which 2 sample files provided below. File-1 (with A,B as column headers) A,B 1,2 File-2 (with C, D as column headers) C,D 4,5 I... (7 Replies)
Discussion started by: ks_reddy
7 Replies

2. UNIX for Advanced & Expert Users

Cannot find logical file format for BSD file headers.

Hi. Unix rookie here. Been looking for a few days for reference documents on how BSD UNIX lays the logical file format onto a disk. Goal is to view/edit with hex editor for data repair. Lots of docs are available for how to use Unix commands (like xxd), but I want to learn the map of how Unix... (4 Replies)
Discussion started by: Chris_top_he_r
4 Replies

3. UNIX for Dummies Questions & Answers

Append file name to fasta file headers in Linux

How do we append the file name to fasta file headers in multiple fasta-files in Linux? (10 Replies)
Discussion started by: Mauve
10 Replies

4. Shell Programming and Scripting

Sar -u generates multiple column headers in csv file

Hi All, The below sar -u command generates multiple column headers in csv file Expected output should print column headers only once in the csv file shell script: $cat sar_cpu_EBS.sh #!/bin/bash while ; do sar -u 15 1 | awk '/^/ {print $1,$2,$4,$6,$7}' | tr -s ' ' ',' >>... (6 Replies)
Discussion started by: a1_win
6 Replies

5. Shell Programming and Scripting

Merging File with headers

Hi I need to merge 4 files. The issue i am facing is all the files have headers and i do not want them in the final output file. Can anybody suggest how to do it? (5 Replies)
Discussion started by: Arun Mishra
5 Replies

6. UNIX for Dummies Questions & Answers

Using sed command to remove multiple instances of repeating headers in one file?

Hi, I have catenated multiple output files (from a monte carlo run) into one big output file. Each individual file has it's own two line header. So when I catenate, there are multiple two line headers (of the same wording) within the big file. How do I use the sed command to search for the... (1 Reply)
Discussion started by: rebazon
1 Replies

7. Shell Programming and Scripting

Editing File Headers

Hey Guys, Absolute neewbie here. I am trying to see if it is possible to edit headers/meta-data of files in Mac OSX. I am basically trying to change an audio file header to read 16bit instead of 24bit. We have an issue with some of our software and it regularly exports 16bit audio files with... (3 Replies)
Discussion started by: andysuperaudiom
3 Replies

8. Shell Programming and Scripting

Merging of files with different headers to make combined headers file

Hi , I have a typical situation. I have 4 files and with different headers (number of headers is varible ). I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only). For example - File 1 H1|H2|H3|H4 11|12|13|14 21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies

9. UNIX for Dummies Questions & Answers

reading file headers

Hello, I have done much googling on this, but apparently not using the right keywords. I am assuming there is some kind of header for each file on a disk which stores information such as mod time, access time, etc. I have two questions: 1) is there a way to read this header directly,... (2 Replies)
Discussion started by: Allasso
2 Replies

10. Shell Programming and Scripting

Remove text between headers while leaving headers intact

Hi, I'm trying to strip all lines between two headers in a file: ### BEGIN ### Text to remove, contains all kinds of characters ... Antispyware-Downloadserver.com (Germany)=http://www.antispyware-downloadserver.c om/updates/ Antispyware-Downloadserver.com #2... (3 Replies)
Discussion started by: Trones
3 Replies
Login or Register to Ask a Question
odump(1)						      General Commands Manual							  odump(1)

Name
       odump - dumps selected parts of an object file

Syntax
       odump [ options ] file...

Description
       The command dumps selected parts of each object file.  This command works for object files and archives of object files.

Options
       The following options are available with the command:

       -a	  Dumps the archive header for each member of the specified archive file.

       -f	  Dumps each file header.

       -g	  Dumps the global symbols from the symbol table of a RISC archive.

       -o	  Dumps each optional header.

       -h	  Dumps section headers.

       -i	  Dumps the symbolic information header.

       -s	  Dumps section contents.

       -r	  Dumps relocation information.

       -l	  Dumps line number information.

       -t	  Dumps symbol table entries.

       -zname	  Dumps line number entries for the specified function name.

       -c	  Dumps the string table.

       -L	  Interpret and print the contents of the .lib sections.

       -F	  Dumps the file descriptor table.

       -P	  Dumps the procedure descriptor table.

       -R	  Dumps the relative file index table.

       The command accepts these modifiers with the options:

       -dnumber   Dumps  the  section  number or a range of sections starting at number and ending either at the last section number or the number
		  you specify with +d.

       +dnumber   Dumps sections in the range beginning with the first section or beginning with the section you specify with -d.

       -nname	  Dumps information only about the specified name.  This modifier works with -h, -s, -r, -l, and -t.

       -p	  Does not print headers

       -tindex	  Dumps only the indexed symbol table entry.  You can also specify a range of symbol table entries by using the modifier  -t  with
		  the +t option.

       +tindex	  Dumps  the symbol table entries in the specified range.  The range begins at the first symbol table entry or at the entry speci-
		  fied by -t.  The range ends with the specified indexed entry.

       -u	  Underlines the name of the file for emphasis.

       -v	  Dumps information symbolically rather than numerically (for example, Static rather than 0X02 ).  You can use	-v  with  all  the
		  options except -s.

       -zname,number
		  Dumps the specified line number entry or a range of line numbers.  The range starts at the number for the named function.

       +znumber   Dumps line numbers for a specified range.  The range starts at either the name or number specified by -z The range ends with the
		  number specified by +z.

       Also, an option and its modifier can be separated by using blanks.  The name can be separated from the number that modifies -z by replacing
       the comma with a blank.

       The command tries to format information in a helpful way, printing information in character, hexadecimal, octal, or decimal as appropriate.

See Also
       a.out(5), ar(5)

								       RISC								  odump(1)