Sponsored Content
Top Forums Shell Programming and Scripting Retrieve the record using 2,2 lines and display the ouput in columnwise Post 302533197 by chakkaravarthy on Thursday 23rd of June 2011 03:28:31 AM
Old 06-23-2011
Retrieve the record using 2,2 lines and display the ouput in columnwise

This is my file
-------------
Code:
Using index 8 for dump of table abd_det. (6101)
Dumped 0 records. (13932)
Using index 10 for dump of table abscc_det. (6101)
Dumped 0 records. (13932)
Using index 14 for dump of table absc_det. (6101)
Dumped 254365 records. (13932)
Using index 16 for dump of table absd_det. (6101)
Dumped 0 records. (13932)
Using index 18 for dump of table absi_mstr. (6101)
Dumped 0 records. (13932)
Using index 19 for dump of table absl_det. (6101)
Dumped 0 records. (13932)
Using index 21 for dump of table absr_det. (6101)
Dumped 66359 records. (13932)

I want the output like this:
-------------------------
Code:
abd_det - 0
abscc_det-0
absc_det-254365
absd_det-0
absi_mstr-0
absl_det-0
absr_det-66359


Last edited by Franklin52; 06-23-2011 at 04:53 AM.. Reason: Please use code tags for data and code samples
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

retrieve lines that match a pattern

Hi, I would like to know how can I get lines from a text file that match no more than 2 '>'. Example: Input file: a >cr1 4 a>b b>c a >cr2 5 a>b Output file: a >cr2 5 a>b Thanks in advance (2 Replies)
Discussion started by: fadista
2 Replies

2. Shell Programming and Scripting

Script to display record spanning over multiple lines

Following are the lines from /etc/sudoers.conf bob SPARC = (OP) ALL : SGI = (OP) ALL fred ALL = (DB) NOPASSWD: ALL ALL CDROM = NOPASSWD: /sbin/umount /CDROM,\ /sbin/mount -o nosuid\,nodev /dev/cd0a /CDROM Could you please help me with shell/perl script to display the records with... (2 Replies)
Discussion started by: Ujan
2 Replies

3. UNIX for Dummies Questions & Answers

retrieve lines using sed, grep or awk

Hi, I'm looking for a command to retrieve a block of lines using sed or grep, probably awk if that can do the job. In below example, By searching for words "Third line2" i'm expecting to retrieve the full block starting with 'BEGIN' and ending with 'END' of the search. Example: ... (3 Replies)
Discussion started by: learning_linux
3 Replies

4. Programming

How can i retrieve some specific lines from a file using C

Plz tel me how to retrieve some specific set of lines from a file and store it in a char buffer.I am seperating each record by ":" 22:abc:4 hardware:cd:xyz:2 hardware:eth:abc:6 hardware:mouse:xyz:3 hardware:ram:xyz:1 23:cde:3 hardware:cd:xyz:2 hardware:eth:abc:6 hardware:ram:xyz:1 ... (3 Replies)
Discussion started by: vigneshinbox
3 Replies

5. Shell Programming and Scripting

have to retrieve the distinct values (not duplicate) from 2nd column and display

I have a text file names test2 with 3 columns as below . We have to retrieve the distinct values (not duplicate) from 2nd column and display. I have used the below command but giving some error. NS3303 NS CRAFT LTD NS3303 NS CHIRON VACCINES LTD NS3303 NS ALLIED MEDICARE LTD NS3303 NS... (16 Replies)
Discussion started by: shirdi
16 Replies

6. Shell Programming and Scripting

Retrieve lines from a file in a given date range

Hey, guys! I am trying to retrieve lines from a file in a given date range. I tried using sed -n "/${SDATE}/,/${EDATE}/p" ~/webhits/$FILE | wc -l but that doesn't work if the starting or the end date do not match exactly. If both dates match, there are no problems (for example 25 March 2008 -... (5 Replies)
Discussion started by: oopcho
5 Replies

7. Shell Programming and Scripting

how to retrieve lines that the first 4 columns have different values

Hi, all: I am not familiar with unix,and just started awk scripts. I want to retrieve lines that have the first 4 columns with different values. For example, the input is like this (tab delimited file with one header) r1 A A A A x r2 A B B A x r3 B B B B x the output should be (header is... (15 Replies)
Discussion started by: new2awkin2011
15 Replies

8. Shell Programming and Scripting

Help with keep the first record display

Input file: 10 TMP_12 asdg 13 TMP_12 asdg 123 TMP_12 pasf 123 ASD qwe 224 AW4 asrfwe 524 AW4 2342 724 AW4 poimv 241 AW4 oiljs . . Desired output file: 10 TMP_12 asdg 13 TMP_12 asdg 123 ASD qwe 224 AW4 asrfwe . (2 Replies)
Discussion started by: perl_beginner
2 Replies

9. UNIX for Beginners Questions & Answers

awk command to retrieve record 23 and 89 from UNIX file

Hi Everyone, I am looking for awk command to retrieve only the record number 23 and record number 89 from a unix file? Please let me know what is the awk command for this? Regards Rakesh (1 Reply)
Discussion started by: rakeshp
1 Replies

10. Homework & Coursework Questions

awk command to retrieve record 23 and 89 from UNIX file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am looking for awk command to retrieve only the record number 23 and record number 89 from a unix file?... (6 Replies)
Discussion started by: rakeshp
6 Replies
dump(1) 							   User Commands							   dump(1)

NAME
dump - dump selected parts of an object file SYNOPSIS
dump [-aCcfghLorstV [-p]] [ -T index [ , indexn]] filename... dump [ -afhorstL [-p] [v]] filename... dump [ -hsr [-p] [ -d number [ , numbern]]] filename... dump [ -hsrt [-p] [-n name]] filename... DESCRIPTION
The dump utility dumps selected parts of each of its object file arguments. The dump utility is best suited for use in shell scripts, whereas the elfdump(1) command is recommended for more human-readable output. OPTIONS
This utility will accept both object files and archives of object files. It processes each file argument according to one or more of the following options: -a Dumps the archive header of each member of an archive. -c Dumps the string table(s). -C Dumps decoded C++ symbol table names. -f Dumps each file header. -g Dumps the global symbols in the symbol table of an archive. -h Dumps the section headers. -L Dumps dynamic linking information and static shared library information, if available. -o Dumps each program execution header. -r Dumps relocation information. -s Dumps section contents in hexadecimal. -t Dumps symbol table entries. -T index Dumps only the indexed symbol table entry defined by index or a range of entries defined by index1,index2. -T index1,index2 -V Prints version information. The following modifiers are used in conjunction with the options listed above to modify their capabilities. -d number Dumps the section number indicated by number or the range of sections starting at number1 and ending at number2. -d number1,number2 This modifier can be used with -h, -s, and -r. When -d is used with -h or -s, the argument is treated as the number of a section or range of sections. When -d is used with -r, the argument is treated as the number of the section or range of sections to which the relocation applies. For example, to print out all relocation entries associated with the .text section, specify the number of the section as the argument to -d. If .text is section number 2 in the file, dump -r -d 2 will print all associated entries. To print out a specific relocation section, use dump -s -n name for raw data output, or dump -sv -n name for interpreted output. -n name Dumps information pertaining only to the named entity. This modifier can be used with -h, -s, -r, and -t. When -n is used with -h or -s, the argument will be treated as the name of a section. When -n is used with -t or -r, the argument will be treated as the name of a symbol. For example, dump -t -n .text will dump the symbol table entry associated with the symbol whose name is .text, where dump -h -n .text will dump the section header information for the .text section. -p Suppresses printing of the headings. -v Dumps information in symbolic representation rather than numeric. This modifier can be used with -a (date, user id, group id) -f (class, data, type, machine, version, flags) -h (type, flags) -L (value) -o (type, flags) -r (name, type) -s (interpret section contents wherever possible) -t (type, bind) When -v is used with -s, all sections that can be interpreted, such as the string table or symbol table, will be interpreted. For example, dump -sv -n .symtab filename... will produce the same formatted output as dump -tv file- name..., but dump -s -n .symtab filename... will print raw data in hexadecimal. Without additional modifiers, dump -sv filename... will dump all sections in the files, interpreting all those that it can and dumping the rest (such as .text or .data) as raw data. The dump utility attempts to format the information it dumps in a meaningful way, printing certain information in character, hexadecimal, octal, or decimal representation as appropriate. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWbtool | +-----------------------------+-----------------------------+ SEE ALSO
elfdump(1), nm(1), ar.h(3HEAD), a.out(4), attributes(5) SunOS 5.10 6 Sep 2002 dump(1)
All times are GMT -4. The time now is 11:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy