10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I am trying to write sed code where it will look through the text for lines with specific expression "Started by user" and when found, will also add the following line, and also lines with another expression "Finished:"
sed -n '/Started by user/, +1p, /Finished:/'... (4 Replies)
Discussion started by: dlesny
4 Replies
2. Shell Programming and Scripting
All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed...
I have an input file similar to:
&LOG
&LOG Part: "@DB/TC10000021855/--F"
&LOG
&LOG
&LOG Part: "@DB/TC10000021852/--F"
&LOG Cloning_Action: RETAIN
&LOG Part: "@DB/TCCP000010713/--A"
&LOG
&LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies
3. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
4. Shell Programming and Scripting
Would appear to me to be a farily simple question but having search all the threads I can't find the answer .. I just want sed to output the single line in a file that contains two string anywhere on the line..
e.g. currently using this command
sed -n -e'/str1/p' -e '/str2/p' < file
and... (3 Replies)
Discussion started by: flopster
3 Replies
5. Shell Programming and Scripting
Hi,
I am have one file with a line
group=project_live
I need to replace it with line
group=project_live_support
before I execute some application related script.
The potentianl problem is when I replace this with sed using command
sed... (2 Replies)
Discussion started by: bhaskar_m
2 Replies
6. Shell Programming and Scripting
I'm using sed to pull links from a rather large html file, and so far it's working rather well, but I've noticed that it is skipping some links.
On some lines there are multiple links for example:
It is completely skipping the first link in these.
Here is what I'm using:
sed 's/^.*<a... (4 Replies)
Discussion started by: DrMachin
4 Replies
7. Shell Programming and Scripting
Hello, im writing a script that validates a URL (the parameter) using http://validator.w3.org
first it downloads the site (the output line I want is stored in the h2 field of the site's html.
wget http://validator.w3.org/check?url=$1 2> /dev/null
sed -n '/<h2/p' check?uri=$1 | sed 's/... (5 Replies)
Discussion started by: drareeg
5 Replies
8. Shell Programming and Scripting
Hi there!
I am really enjoying working with sed. I am trying to come up with a sed command to replace some occurrences (not all) in the same line, for instance:
I have a command which the output will be:
200.300.400.5 0A 0B 0C 01 02 03
being that the last 6 strings are actually one... (7 Replies)
Discussion started by: ppucci
7 Replies
9. Shell Programming and Scripting
hey gents,
I'm working on something that will use snmpwalk to query the devices on my network and retreive the device name, device IP, device model and device serial. I'm using Nmap for the enumeration and sed to clean up the results for use by snmpwalk. Once i get all the data organized I'm... (8 Replies)
Discussion started by: mitch
8 Replies
10. Shell Programming and Scripting
Please help!
Input pattern, where ... could be any number of lines
struct A {
Blah1
Blah2
Blah3
...
} B;
output pattern
struct AB {
Blah1
Blah2
Blah3
...
};
I need help in extracting everything between { and }
if it would have been on a single line { \(.*\)} should have worked. (15 Replies)
Discussion started by: SiftinDotCom
15 Replies