10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies
2. Shell Programming and Scripting
Hi,
I need a help to search a pattern and print the multiple lines between them.
Input file:
Tue May 29 12:30:33 EDT 2012:threadWebContainer : 357:com.travimp.hotelierlinks.abba.service.RequestHandler.requestService(String, ITICSDataSet): hotelCancelReservation request: ... (4 Replies)
Discussion started by: aroragaurav.84
4 Replies
3. UNIX for Dummies Questions & Answers
Hi,
i have data file like:
START1
a
b
STOP
c
d
START2
e
STOP
f
START3
g
STOP
When one of the START<count> variable is passed, i should print all lines matching this until the first 'STOP'
for example if 'START2' is provided for match, i should get the result as:
START2 (1 Reply)
Discussion started by: ysrini
1 Replies
4. Shell Programming and Scripting
Can anyone help me with how to print the variable using a awk statement.
for i in ` cat serverlist.txt ` ; do
my command | awk '{print $1 $2 $i}'
done
It should print like below but it is not
XXXXX YYYYY Servername
XXXXX YYYYY Servername
XXXXX YYYYY Servername
XXXXX YYYYY... (6 Replies)
Discussion started by: rrb2009
6 Replies
5. Shell Programming and Scripting
How to to pass variable to the below awk command
I would like to pass variables to the awk command instead of the constants "a/cc" but I don't know exactly the correct syntax
awk '/a/,/cc/' temp1.out
file.txt
a
b
s
cc
g
d
output
a
b
s (8 Replies)
Discussion started by: ahmedamro
8 Replies
6. Shell Programming and Scripting
Hi,
I want to search for patterns (from a file) in a file and print the line matching the patterns and the line before it.
I have to search for 100s of patterns from a file.
Any help with AWK or Sed.
Thanks! (2 Replies)
Discussion started by: saint2006
2 Replies
7. Shell Programming and Scripting
HiCan someone show me how to print all lines from a file after a line matching a pattern using sed?Thanks (13 Replies)
Discussion started by: steadyonabix
13 Replies
8. Shell Programming and Scripting
Hi,
I know how to use awk to search some expressions like five consecutive numbers, , this is easy.
However, how do I make awk print the pattern that is been matched?
For example:
input: usa,canada99292,japan222,france59664,egypt223
output:99292,59664 (6 Replies)
Discussion started by: grossgermany
6 Replies
9. Shell Programming and Scripting
I need sed to add a "/>" to the end of a line that contains/starts with <meta.
current line is <meta name="keywords" content="kayword 1, kwyword2">
and should be <meta name="keywords" content="kayword 1, kwyword2 " />
i need something like this?
find . -name "*.html" -print0 | xargs... (6 Replies)
Discussion started by: sky_rivers
6 Replies
10. Shell Programming and Scripting
Hi
It is possible with sed to print a pattern within a line matching regexp?
So, the line looks like : 19:00:00 blablablabla jobid 2345 <2>
the regexp is "jobid 2345" and the pattern is 56434.
That the code for find... (2 Replies)
Discussion started by: nymus7
2 Replies