09-28-2011
better google it . you can solve it easily by using redirection
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to extract "securitySettings" out of line:
<a ref ="http://localhost:5654/securitySettings">
using sed as follows:
name = `grep "localhost" file.html | sed -n 's/.**\/\(.*)/\">/\1/p'`
But it didn't run, seems have some syntax error. Do anybody knows why?
Thank you very... (11 Replies)
Discussion started by: zhen
11 Replies
2. Shell Programming and Scripting
Hi,
Please let me know how do we write a piece of code to extract characters from a line using SED. (1 Reply)
Discussion started by: Shilpi
1 Replies
3. Shell Programming and Scripting
Need help..not sure how to use with awk or sed
I want to take data from the notification.$$ file and assign the data to variable "group". Not sure how to do it.
The data I want to extract from the notification.$$ is on the first line of the file ..right after the (notice):
NetWorker... (5 Replies)
Discussion started by: gzs553
5 Replies
4. Shell Programming and Scripting
On OS 10.4.11
I have filenames like:
670711 SA T2 v1-1_DS_EF.doc
CT_670520 AM T1 v1-2_DS_EF.doc
CT_670716 - 2 SA T4 v1-2_DS_EF.doc
CT_670713 SA T3 v1-1_DS_EF.doc
670421 PA DYP1 v1-1_DS_EF.doc
CT_670425 PA DYP2 v1-1_DS_EF.doc
CT_670107 RA T3 v1-2_DS_EF.doc
CT_670521 AM T2 v1-2_DS_EF.doc... (3 Replies)
Discussion started by: mlommel
3 Replies
5. Shell Programming and Scripting
I have the following string:
<min-pool-size>2</min-pool-size>
When I pipe the string into the following code I am expcting for it to return just the value "2", but its just reurning the whole string. Why??
sed -n '/<min-pool-size>/,/<\/min-pool-size>/p'
Outputting:... (13 Replies)
Discussion started by: ArterialTool
13 Replies
6. Shell Programming and Scripting
Hello,
I am new to sed and am trying to extract a word using sed.
for example i have a line "const TotalAmount& getTotalAmount() const; " in the file test.txt
I am trying to extract getTotalAmount() from the line.
For this i tried
cat test.txt | sed -n 's/.*get*\(\)//p
But... (8 Replies)
Discussion started by: prasbala
8 Replies
7. Shell Programming and Scripting
I have an xml file that generally looks like this:
"<row><dnorpattern>02788920</dnorpattern><description/></row><row><dnorpattern>\+
44146322XXXX</dnorpattern><description/></row><row><dnorpattern>40XXX</dnorpattern><description/></row><row><dnorpattern>11</dn... (4 Replies)
Discussion started by: garboon
4 Replies
8. Shell Programming and Scripting
Hi,
I have a text file containing 2 lines as follows:
I'm trying to extract all the strings following an "AME." The output would be as follows:
BUSINESS_UNIT
PROJECT_ID
ACTIVITY_ID
RES_USER1
RESOURCE_ID_FROM
ANALYSIS_TYPE
BI_DISTRIB_STATUS
BUSINESS_UNIT
PROJECT_ID
ACTIVITY_ID... (5 Replies)
Discussion started by: simpletech369
5 Replies
9. Shell Programming and Scripting
I have this command to replace the version value from PROGRAM (for example here PROGRAM == player) by NEWVERSION
sed "/^ *$PROGRAM:/{N; s/*$/ $NEWVERSION/;}" -i $PRDFILE
player:
version: V6R2013xD3HF5v1
player_old:
version: V6R2013xD3HF5v1
partchecker:
version:... (2 Replies)
Discussion started by: jcanale
2 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am attempting to extract the /lib/ paths using sed but it does not appear to work.
./copy_chroot_lib.sh ls echo | sed s#*\(/lib\).*#\1#g
linux-vdso.so.1 (0x00007fff77df1000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f28190ac000)
... (8 Replies)
Discussion started by: sand1234
8 Replies
LEARN ABOUT DEBIAN
google-pprof
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)