Search Results

Search: Posts Made By: imrandec85
6,597
Posted By RudiC
"command substitution" ($(...) or (deprecated)...
"command substitution" ($(...) or (deprecated) `...`) allows the output of a command to replace the command name. (c.f. man bash)
I guess frmcmp.batch.sh doesn't produce any output on stdout, so the...
1,862
Posted By RavinderSingh13
Hello imrandec85, Following may help you in...
Hello imrandec85,

Following may help you in same.

awk 'FNR==NR{ #### FNR and NR are the awk's built-in variables, so FNR will be representing the current Input_file's line...
1,862
Posted By RavinderSingh13
Hello imrandec85, Following may help you in...
Hello imrandec85,

Following may help you in same.

awk 'FNR==NR{A[$0];next} ((substr($0,6,3)) in A){print $0 > "output_file1.txt";delete A[substr($0,6,3)];next} !((substr($0,6,3)) in A){print >...
1,862
Posted By RudiC
Try awk 'FNR==NR {T[$1]; next} !(substr($0, 6, 3)...
Try awk 'FNR==NR {T[$1]; next} !(substr($0, 6, 3) in T) {print > "output_file2.txt"; next} 1' file2 file1
2,025
Posted By wisecracker
Try:- echo ' /bin/awk '\''{$0 = FILENAME "|"...
Try:-
echo ' /bin/awk '\''{$0 = FILENAME "|" $0; print}'\'' $FILE' >> /tmp/append_flname.sh
2,025
Posted By RudiC
Try echo "/bin/awk '{$0 = FILENAME \"|\" $0;...
Try
echo "/bin/awk '{$0 = FILENAME \"|\" $0; print}' \$FILE"

or

echo '/bin/awk '\''{$0 = FILENAME "|" $0; print}'\'' $FILE'
1,376
Posted By RudiC
How about awk '{SQ=0; for (i=3; i<=NF; i+=2)...
How about
awk '{SQ=0; for (i=3; i<=NF; i+=2) print $1, $2, ++SQ, $i, $(i+1)}' FS=, OFS="|" file
4888|4891|1|19.2076|-34.23549
4888|4891|2|19.2049|-34.23539
4855|4891|1|19.2026|-34.23579...
Showing results 1 to 7 of 7

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