Search Results

Search: Posts Made By: vikus
1,069
Posted By Scrutinizer
Those three scripts need wait statements at the...
Those three scripts need wait statements at the end (as a last statement)
wait
Then you can just do something like this in the main script:
for i in 1 2 3
do
"./$i.sh"
done
1,200
Posted By disedorgue
Hi, $ perl -pe...
Hi,
$ perl -pe 's@;%/A;[^;]*;[^;]*;@;%/A;90;99;@' foo.csv
;A1;AAA;%/A/B;70;75;-;
;A1;AAA;%/A/C;70;75;-;
;A1;BBB;%/A/G;70;75;-;
;A1;BBB;%/A;90;99;-;
Regards.
1,368
Posted By neutronscott
$ awk 'FNR==NR { f2[$1]=$6 OFS $7 OFS $8; next} {...
$ awk 'FNR==NR { f2[$1]=$6 OFS $7 OFS $8; next} { if ($9 in f2) { print $0, f2[$9] } else { print $0,"NA","NA","NA" } }' OFS=';' file2 FS=';' file1
A1;B1;C1;D1;E1;F1;G1;H1;III1;J1;P1;None;NA...
2,554
Posted By Corona688
This is especially convenient in perl as you can...
This is especially convenient in perl as you can assign a list of variables to a list of results. split() like many things returns a list.

my ($a,$b,$c,$d,$e)=split(/;/,"a;b;c;d;e");

print "a...
1,904
Posted By CarloM
'NR==FNR { f2[$4]=$2 OFS $3 OFS $5 }For...
'NR==FNR {
f2[$4]=$2 OFS $3 OFS $5
}For lines in the first file specified on the command line (total record number equals file record number): Set an array ('f2') element indexed by the value of...
1,533
Posted By zaxxon
awk '/^A/ {a=$2} /^S/ {b=$2} /^Z/ {c=$2} /^P/...
awk '/^A/ {a=$2} /^S/ {b=$2} /^Z/ {c=$2} /^P/ {d=$2} /^R/ {gsub(/:/, "", $2); print a,b,c,d,$2 OFS}' OFS=\| infile
1,212
Posted By RudiC
Try awk '/AA/ {printf "%s",DELIM $2" ";...
Try awk '/AA/ {printf "%s",DELIM $2" "; DELIM="\n"} ; $3 ~ /^CC/ {printf "%s ",$3 } END {print ""}' file
4,331
Posted By Aia
Test it! awk 'NR==FNR {r[$1]=$0;next;}...
Test it!

awk 'NR==FNR {r[$1]=$0;next;} {for(i=1; i<=NF; i++) if( $i ~ /XXX/){ $i in r ? $i = r[$i] : $i = $i ":NA:NA"}; print $0}' FS=: OFS=: file2 file1
Showing results 1 to 8 of 8

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