Sponsored Content
Top Forums Shell Programming and Scripting Grep or print each section of a file on one line with a separator Post 302841239 by gefa on Wednesday 7th of August 2013 06:16:20 AM
Old 08-07-2013
yes that works, thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help find a section line of a file

hi, I have a 20 line file. I need a command which will brinf back a specific line based upon the line number I enter. e.g. the file looks like this and is called file1 jim is a man john is a woman james is a man wendy is a woman lesley is a woman i want a command that will... (4 Replies)
Discussion started by: sureshy
4 Replies

2. Shell Programming and Scripting

Awk+Grep Input file needs to match a column and print the entire line

I'm having problems since few days ago, and i'm not able to make it works with a simple awk+grep script (or other way to do this). For example, i have a input file1.txt: cat inputfile1.txt 218299910417 1172051195 1172070231 1172073514 1183135117 1183135118 1183135119 1281440202 ... (3 Replies)
Discussion started by: poliver
3 Replies

3. Shell Programming and Scripting

Extract section of file based on word in section

I have a list of Servers in no particular order as follows: virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection). 9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
Discussion started by: jelloir
2 Replies

4. Shell Programming and Scripting

Prepend first line of section to each line until the next section header

I have searched in a variety of ways in a variety of places but have come up empty. I would like to prepend a portion of a section header to each following line until the next section header. I have been using sed for most things up until now but I'd go for a solution in just about anything--... (7 Replies)
Discussion started by: pagrus
7 Replies

5. Shell Programming and Scripting

Print the first n line in each section

Hi, i have a file like this: ... 11111111 22222222 33333333 # 4444444 5555555 6666666 7777777 # ... i want just print the 2 first line between each section (each section is separated with "#"). so desired output would be like this: ... 11111111 22222222 (3 Replies)
Discussion started by: saeed.soltani
3 Replies

6. Shell Programming and Scripting

Grep in file and print in the line

hi # cat test.txt Test Date: 20131008 1515 -------------------------------------------------------------------------------------------------------------- Saxx = Proc_m0_s13 : 1640 Saxx = Proc_m0_s15 : 1791 Saxx = Proc_m0_s17 ... (2 Replies)
Discussion started by: justbow
2 Replies

7. UNIX for Dummies Questions & Answers

Grep file and print value only if the following line doesnt contain value xxxx

Hi All, I have some large files which I would like to obtain some data from, I want to grep (or alturnative method) out certain values hut only if the folowing line doesnt contain a certain value. I will explain better below showing an example print of the data. NE : V0001 NE : V0002... (6 Replies)
Discussion started by: mutley2202
6 Replies

8. Shell Programming and Scripting

Use two field separator in the same line and print them

Hi Guys, I have the file --- HOST_NAME,data_coleta,data_carga,CPU_util,CPU_idle,run_queue,memory,MEMORY_SYSTEM,MEMORY_TOTAL,MEMORY_SWAPIN,MEMORY_SWAPOUT,DISK_READ,DISK_WRITE,DISK_IO,NET_IN_PACKET, NET_OUT_PACKET... (4 Replies)
Discussion started by: antoniorajr
4 Replies

9. UNIX for Beginners Questions & Answers

Grep a section from an UNIX file obtaining only part of the data

Hello, I have a log file that has several sections "BEGIN JOB, End of job" like in the following example: 19/06/12 - 16:00:57 (27787398-449294): BEGIN JOB j1(27787398-449294) JOB1 19/06/12 - 16:00:57 (27787398-449294): DIGIT: 0 number of present logs : 1 19/06/12 - 16:00:57... (4 Replies)
Discussion started by: mvalonso
4 Replies

10. Shell Programming and Scripting

How to change file section into each line?

Hi Gurus, I have below file which has different sections, need to move the sections to beginning of the each record. original file aaa bbb ccc ddd eee fff output file. aaa bbb ccc ddd eee fff (6 Replies)
Discussion started by: green_k
6 Replies
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)
All times are GMT -4. The time now is 01:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy