Sponsored Content
Top Forums Shell Programming and Scripting how read specific line in a file and write it in a new text file? Post 302598652 by vel4ever on Wednesday 15th of February 2012 04:47:25 AM
Old 02-15-2012
How to content where it ends with &CS=3

Ex:
Code:
http://www.google.com/test/&CS=3
http://www.google.com/sample/&CS=3
http://www.google.com/hello/&CS=3

text.txt
Code:
http://www.google.com/test/
http://www.google.com/sample/
http://www.google.com/hello/

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

read specific text from a log file

Hi guys I need to retrieve the values in BOLD that I have mentioned in the below log file. I want to store those values in a variable, preferably the same name as the column name in the log file. if you paste the below mentioned log file in a notepad and remove the word wrap.. u will get a... (4 Replies)
Discussion started by: ragha81
4 Replies

2. Shell Programming and Scripting

read space filled file and replace text at specific position

Hi I have a spaced filled file having records like below: What I want is to read line having RT3 at position 17-19 then go to position 2651 check the 18 characters (might be space filled till 18 characters). This position should have a... (6 Replies)
Discussion started by: COD
6 Replies

3. 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

4. Shell Programming and Scripting

Read Write byte range/chunk of data from specific location in file

I am new to Unix so will really appreciate if someone can guide me on this. What I want to do is: Step1: Read binary file - pick first 2 bytes, convert from hex to decimal. Read the next 3 bytes as well. 2 bytes will specify the number of bytes 'n' that I want to read and write... (1 Reply)
Discussion started by: Kbenipel
1 Replies

5. Shell Programming and Scripting

Read file from nth line to specific character

Hi, I want to read the file from nth line (where n is an integer) to until I encounter @ char. Can any one please help me how to do this? Thanks. (3 Replies)
Discussion started by: laalesh
3 Replies

6. Shell Programming and Scripting

write specific line number in file

dear all, i need your advice i have sample script like this: testing.sh for i in {1..10} do echo testing $i done but i forgot create "#!/bin/bash" in above "for" so i want output will like this testing.sh #!/bin/bash for i in {1..10} do echo testing $i done (2 Replies)
Discussion started by: zvtral
2 Replies

7. Shell Programming and Scripting

How to read particular line in file from specific column?

Hi...friends.... I want to create inventory...information for that I need to read some specific row say 2nd row from 1st 3 column and and write data with particular file used, I have some more column also but I need only 3 column data of first entry after header I attached sample file..those... (12 Replies)
Discussion started by: nex_asp
12 Replies

8. Shell Programming and Scripting

To read specific line from a file

Hi, I have a ldif file like below: version: 1 dn: cn=Test Group,ou=Applications,dc=xyz,dc=com objectClass: groupOfUniqueNames objectClass: top cn: Test Group uniqueMember: uid=abc,ou=People,o=xyz,o=Corporate,dc=xyz,dc=com dn: cn=Test Sub Group,cn=Test... (4 Replies)
Discussion started by: saurau
4 Replies

9. 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

10. Shell Programming and Scripting

How to read all data after a specific string from a text file ?

Hi, I have a file(input.txt) and trying to format as output.txt. See the attached file format. Note: This is a windows file (DOS format) and the commands are also going to execute on windows. Basically I am trying to capture all the data in between Local Group Memberships and Global Group... (10 Replies)
Discussion started by: Monoj2014
10 Replies
PPROF(1)							      Google								  PPROF(1)

NAME
google-pprof - manual page for google-pprof (part of gperftools) SYNOPSIS
google-pprof [options] <program> <profile> DESCRIPTION
Prints specified cpu- or heap-profile OPTIONS
--cum Sort by cumulative data --base=<base> Subtract <base> from <profile> before display Reporting Granularity: --addresses Report at address level --lines Report at source line level --functions Report at function level [default] --files Report at source file level Output type: --text Generate text report [default] --gv Generate Postscript and display --list=<regexp> Generate source listing of matching routines --disasm=<regexp> Generate disassembly of matching routines --dot Generate DOT file to stdout --ps Generate Postcript to stdout --pdf Generate PDF to stdout --gif Generate GIF to stdout Heap-Profile Options: --inuse_space Display in-use (mega)bytes [default] --inuse_objects Display in-use objects --alloc_space Display allocated (mega)bytes --alloc_objects Display allocated objects --show_bytes Display space in bytes --drop_negative Ignore negaive differences Call-graph Options: --nodecount=<n> Show at most so many nodes [default=80] --nodefraction=<f> Hide nodes below <f>*total [default=.005] --edgefraction=<f> Hide edges below <f>*total [default=.001] --focus=<regexp> Focus on nodes matching <regexp> --ignore=<regexp> Ignore nodes matching <regexp> --scale=<n> Set GV scaling [default=0] EXAMPLES
google-pprof /bin/ls ls.prof Outputs one line per procedure google-pprof --gv /bin/ls ls.prof Displays annotated call-graph via 'gv' google-pprof --gv --focus=Mutex /bin/ls ls.prof Restricts to code paths including a .*Mutex.* entry google-pprof --gv --focus=Mutex --ignore=string /bin/ls ls.prof Code paths including Mutex but not string google-pprof --list=getdir /bin/ls ls.prof Dissassembly (with per-line annotations) for getdir() google-pprof --disasm=getdir /bin/ls ls.prof Dissassembly (with per-PC annotations) for getdir() COPYRIGHT
Copyright (C) 2005 Google Inc. SEE ALSO
Further documentation for google-pprof is maintained as a web page called cpu_profiler.html and is likely installed at one of the following locations: /usr/share/gperftools/cpu_profiler.html /usr/local/share/gperftools/cpu_profiler.html google-pprof (part of gperftools) February 2005 PPROF(1)
All times are GMT -4. The time now is 05:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy