Search Results

Search: Posts Made By: Klasform
1,325
Posted By RudiC
Try sed -n '/noob/{:L;N; /noob.*noob/bK; bL;...
Try sed -n '/noob/{:L;N; /noob.*noob/bK; bL; :K;p;q}' file
noob
please
im a noob


---------- Post updated at 15:04 ---------- Previous update was at 14:58 ----------

awk:awk '/noob/ {print;...
1,889
Posted By RudiC
How about sed 's/^/^[^ ]*/;s/$/ /' pattern |...
How about sed 's/^/^[^ ]*/;s/$/ /' pattern | grep -f- content
3,053
Posted By Don Cragun
The command: sed -n -r 's/(<Subject )(.*)(.*...
The command:
sed -n -r 's/(<Subject )(.*)(.* )(.*)(.* )(.*)(.* )(.*)>/\1\8 \6 \4 \2>/p' testfile
should work because of greedy matching forcing the 1st .* to grab everything that the following .* ...
3,053
Posted By RudiC
.* stands for "anystring", so .*.* is...
.* stands for "anystring", so .*.* is anystring followed by anystring, which is equivalent to .* . Your script yields the same as sed -n -r 's/(<Subject )(.* )(.* )(.* )(.*)>/\1\5 \4 \3 \2>/p'...
1,713
Posted By Don Cragun
The differences between: cat split | sed...
The differences between:
cat split | sed '/\(.*varchar.*[)] \)\(.*$\)/ {s//\1\n\2/}'and:
sed 's/\(varchar[(]30[)]\) \(Select\)/\1\
\2/' Split
are:

the 1st form reads the data in split twice...
5,963
Posted By RudiC
Not quite. s//\1/; is executed once as it is...
Not quite. s//\1/; is executed once as it is outside the loop. \1 refers to the parenthesized part in the regex.
Try sed -n '/.*oy\/size">\(.*\).*$/ {s//\1/; :L; l; N; l; s/<\/note-content>//p;...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 09:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy