Search Results

Search: Posts Made By: giri_luck
2,392
Posted By hanson44
I think this is the correct logic for "remove...
I think this is the correct logic for "remove lines that match 2013 and do not contain tttaaa". The way the line starts with < is just a coincidence:
$ sed "/2013/ { /tttaaa/ ! d }" file
<2013 abc...
2,392
Posted By Yoda
awk '/2013/ && /tttaa/ || !/^</' file
awk '/2013/ && /tttaa/ || !/^</' file
1,083
Posted By elixir_sinari
In ksh93/bash: x=(a b c) y=(d e) ...
In ksh93/bash:
x=(a b c)
y=(d e)
times=$((${#x } * ${#y }))
((xi=yi=0))
for((i=1;i<=times;i++,xi++,yi++))
do
if((xi>${#x }-1));then xi=0;fi
if((yi>${#y }-1));then yi=0;fi
print...
7,118
Posted By JavaHater
awk -F"|" '$1~/BELL-1180-1180-81/ &&...
awk -F"|" '$1~/BELL-1180-1180-81/ && $2!~/:10[12]$/' file
1,107
Posted By agn
Try, $ sed -n '/Final/,/^<pg name="path"...
Try,


$ sed -n '/Final/,/^<pg name="path" type="Path">$/p' file
Final
.....
.....
....
<pg name="path" type="Path">
Showing results 1 to 5 of 5

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