Search Results

Search: Posts Made By: OMLEELA
1,964
Posted By kurumi
$ ruby -ne 'puts...
$ ruby -ne 'puts $_.scan(/[\(\047](.*?)[\)\047]/).flatten.join("\s")' file
130 ESN:27723211621B01DJ68AG AVAILABLE
130 ESN:27723211634ATADJ68AK AVAILABLE
1,964
Posted By cgkmal
Sure OMLEELA, I'll try to explain good...
Sure OMLEELA,

I'll try to explain good enough :D

I'm using gensub function with regexp back reference feature, This feature within gensub works something like this:

gensub(/regexp/,...
1,964
Posted By aster007
Had to divide it into 2 parts since the...
Had to divide it into 2 parts since the separators were different

cat LOGFILE | grep "number wasnt" | head -2 | while read LINE
do
BRACKET_TXT=`echo $LINE | awk '$0=$2' FS=\( RS=\) | tr -s...
1,964
Posted By michaelrozar17
Through sed.. grep 'number wasnt' logfile.txt...
Through sed..
grep 'number wasnt' logfile.txt |head -2| sed "s/^.*(\([^)]*\)).*(....\(.*\)).*'\(.*\)'.*/\1 \2 \3/"
3,137
Posted By rdcwayx
awk -F \" '/Deleting/{split($1,a,"[) ]");print $2...
awk -F \" '/Deleting/{split($1,a,"[) ]");print $2 " - " a[7];next}1' infile
3,137
Posted By Chubler_XL
sed -n 's/Deleting Text .*ESN:...
sed -n 's/Deleting Text .*ESN: \(.*\)).*"\(.*\)".*/\2 - \1/p' $LOGFILE
3,137
Posted By cambridge
Head 3 preserving blank lines ... awk '!$1 ||...
Head 3 preserving blank lines ...
awk '!$1 || d[$1]++ < 3 {print}' <filename> Head 3 losing blank lines ...
awk '$1 && d[$1]++ < 3 {print}' <filename> Tail 3 losing blank lines is a little more...
2,013
Posted By Scott
Hi. awk '$6 == 234 { sub($6, "MCCDK"); print...
Hi.

awk '$6 == 234 { sub($6, "MCCDK"); print }' File[123] > OutputFile


(you could also use { $6 = "MCCDK"; print } but you'd lose formatting)
Showing results 1 to 8 of 8

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