Sponsored Content
Top Forums Shell Programming and Scripting [Solved] How to print specific text from a file? Post 302851529 by vbe on Monday 9th of September 2013 07:15:18 AM
Old 09-09-2013
What was the solution then?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

search and replace a specific text in text file?

I have a text file with following content (3 lines) filename : output.txt first line:12/12/2008 second line:12/12/2008 third line:Y I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before. I tried using cat output.txt... (4 Replies)
Discussion started by: santosham
4 Replies

2. Shell Programming and Scripting

Adding specific text and spaces to each line in a text file

Hi, I wanted to add specific text to each row in a text file containing three rows. Example: 0 8 7 6 5 5 7 8 9 0 7 9 7 8 9 0 1 2 And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this: 21 0 8 7 6 5 5 7 8... (4 Replies)
Discussion started by: hertingm
4 Replies

3. Shell Programming and Scripting

[Solved] Find Specific records from file and add totals into variables

Hi Eveyone, I am working on one shell script to find the specific records from data file and add the totals into variables and print them. you can find the sample data file below for more clarification. Sample Data File: PXSTYL00__20090803USA CHCART00__20090803IND... (7 Replies)
Discussion started by: veeru
7 Replies

4. Shell Programming and Scripting

[bash help]Adding multiple lines of text into a specific spot into a text file

I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it. For example, Here is a portion of a zone file. IN NS ns1.domain.tld. IN NS ns2.domain.tld. IN ... (2 Replies)
Discussion started by: cdn_humbucker
2 Replies

5. Shell Programming and Scripting

Assigning a specific format to a specific column in a text file using awk and printf

Hi, I have the following text file: 8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm 9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm 10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm 11 T1mapping_flip15 ok 128 108 30... (2 Replies)
Discussion started by: goodbenito
2 Replies

6. Shell Programming and Scripting

[solved] how to get specific env variable values into a file

greetings! how do i get an env variable that looks like this when echoed: into a file that looks like this: keeping in mind that the two constants are the fields from the env variable will always be in odd positions of the string that need to go into the file AND they will always start... (3 Replies)
Discussion started by: crimso
3 Replies

7. Shell Programming and Scripting

[Solved] awk compare two different columns of two files and print all from both file

Hi, I want to compare two columns from file1 with another two column of file2 and print matched and unmatched column like this File1 1 rs1 abc 3 rs4 xyz 1 rs3 stu File2 1 kkk rs1 AA 10 1 aaa rs2 DD 20 1 ccc ... (2 Replies)
Discussion started by: justinjj
2 Replies

8. Shell Programming and Scripting

Extract specific line in an html file starting and ending with specific pattern to a text file

Hi This is my first post and I'm just a beginner. So please be nice to me. I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file? I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies

9. Shell Programming and Scripting

Match text from file 1 to file 2 and return specific text

I hope this makes sense and is possible. I am trying to match $1 of panel_genes.txt with $3 of RefSeqGene.txt and when a match is found the value in $6 of RefSeqGene.txt Example: ACTA2 is $1 of panel_genes.txt ACTA2 NM_001613.2 ACTA2 NM_001141945.1 awk 'FNR==NR {... (4 Replies)
Discussion started by: cmccabe
4 Replies

10. Shell Programming and Scripting

Match text to lines in a file, iterate backwards until text or text substring matches, print to file

hi all, trying this using shell/bash with sed/awk/grep I have two files, one containing one column, the other containing multiple columns (comma delimited). file1.txt abc12345 def12345 ghi54321 ... file2.txt abc1,text1,texta abc,text2,textb def123,text3,textc gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
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 06:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy