Search Results

Search: Posts Made By: sharong
2,443
Posted By RudiC
I'm pretty sure all you get from above is 0. ...
I'm pretty sure all you get from above is 0.
What shell do you use? In a recent bash with process substitution, try sth like telnet $IPCMTS 2>> $LDIR/errors.txt | tee >( printf "%s %s\n" 'subslot'...
2
2,929
Posted By RavinderSingh13
Hello, Following awk may also help. ...
Hello,

Following awk may also help.


awk -vs1="NAME" -vs2="!" 'NR==FNR{a[$1];next} ($1 in a){if($1==s1) f=1} f{print} ($1==s2) {f=0}' check_count_check_text1211 check_count_check_text1211
...
2
2,929
Posted By Scrutinizer
Try: perl -ne 'print if /^NAME/ || /^sid9/ .....
Try:
perl -ne 'print if /^NAME/ || /^sid9/ .. /^!/ ' file
or
awk '/^NAME/ || /^sid9/,/^!/' file
1,395
Posted By RudiC
Try awk -vRS="!" -vORS="!" '/deed/'...
Try awk -vRS="!" -vORS="!" '/deed/' file
1,395
Posted By Scrutinizer
You can change s=deed to : s="deed|live"
You can change s=deed to : s="deed|live"
1,395
Posted By Scrutinizer
Or: awk '/^!/{ if(p~s)printf "%s", p; p=x} {p=p...
Or:
awk '/^!/{ if(p~s)printf "%s", p; p=x} {p=p $0 ORS} END{print "!"} ' s=deed file
Showing results 1 to 6 of 6

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