Search Results

Search: Posts Made By: Lakshman_Gupta
3,384
Posted By Don Cragun
Hopefully, RudiC's suggested awk script got you...
Hopefully, RudiC's suggested awk script got you started down a workable path. Unfortunately, with an input file like:
pattern /* comment */
pattern2 /* start
continue comment
This >>> pattern...
3,384
Posted By RudiC
Try thisawk ' {sub...
Try thisawk ' {sub (/--.*$/,"")}
/\/\*/,/\*\// {next}
$0 ~ PAT {print FILENAME}
' PAT="insurance_no" file*
It removes comments first (assuming...
3,384
Posted By junior-helper
I bet it's a Solaris 10 system, because I get the...
I bet it's a Solaris 10 system, because I get the exact messages using default awk.

Try /usr/xpg4/bin/awk or nawk
3,030
Posted By RudiC
If it needs to be a sed command, try:sed -n '1h;...
If it needs to be a sed command, try:sed -n '1h; 1!H; /FAILED/ {n;n;H;x;d}; /PASSED/ {n;H;x;p}' fileWorks on the sample you provided in post #1.
3,030
Posted By Franklin52
You can try something like this with awk: awk ...
You can try something like this with awk:
awk '/PASSED/' RS=* ORS=**** file
1,803
Posted By Skrynesaver
grep ARGV /path/to/script.pl may give some...
grep ARGV /path/to/script.pl may give some indication but really the best way is to read and understand the script itself or failing that check any accompanying documentation
863
Posted By balajesuri
echo "this is a test1,this is test2,this is...
echo "this is a test1,this is test2,this is test3" | sed 's/[^,]*/="&"/g'
3,581
Posted By Scrutinizer
Try: awk '{$1=$1}1' FS='\t' OFS='","' file By...
Try:
awk '{$1=$1}1' FS='\t' OFS='","' file
By assigning $1 onto itself, one of the fields gets altered and therefore the records gets recalculated and FS gets replaced by the OFS..





--...
3,578
Posted By RudiC
Yes. If file1 has zero length, it takes file2 as...
Yes. If file1 has zero length, it takes file2 as file1 and has nothing left to work upon.
Tryawk 'FILENAME==ARGV[1] {T[$1$2$3]; next} ($2$3$4 in T) {next} 1' file1 file2
3,578
Posted By RudiC
I'm not sure that this will run faster than what...
I'm not sure that this will run faster than what you tried before, but nevertheless give it a shot:awk 'NR==FNR {T[$1$2$3]; next} ($2$3$4 in T) {next} 1' file1 file2
Showing results 1 to 10 of 10

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