Search Results

Search: Posts Made By: Ads89
16,800
Posted By RudiC
Don't use single quotes (which prevent expansion...
Don't use single quotes (which prevent expansion by the shell), but double quotes:
grep -E "^$variable" file.csv
1,949
Posted By zaxxon
$ awk -F, 'BEGIN{print "COL1,COL2"} NR>1 && $9...
$ awk -F, 'BEGIN{print "COL1,COL2"} NR>1 && $9 {print $1,$6}' OFS=, input.csv
COL1,COL2
1111,X100
3333,X300
4444,X400
8,047
Posted By RavinderSingh13
Hello Ads89, Could you please try following....
Hello Ads89,

Could you please try following.

awk 'FNR==NR{A[$1]=$NF;next} FNR!=NR && FNR>1{Q=$1;$0=(Q in A)?$0 FS A[$1]:$0 FS;print;next} {print}' FS="|" Input_file2 Input_file1
Output...
2,123
Posted By Don Cragun
If the data in COL2 is the same number of...
If the data in COL2 is the same number of characters in every record and the data in COL3 is the same number of characters in every record, just concatenating those three fields in the awk variable...
2,123
Posted By Don Cragun
I'm not sure that I fully understand what you're...
I'm not sure that I fully understand what you're trying to do, but this seems to produce the output you want for each of the sample inputs you have shown us:
awk '
NR == 1 {
print
FS = OFS =...
2,361
Posted By RudiC
The 4 is the element count from the conversion;...
The 4 is the element count from the conversion; see above:Can't you see the error in ?

---------- Post updated at 16:54 ---------- Previous update was at 16:52 ----------

Enclose split and...
1,177
Posted By RudiC
How about I /tmp/bash-fc-763387004 ...
How about I /tmp/bash-fc-763387004 Row 1 Col 1 3:16 Ctrl-K H for help
awk '...
2,370
Posted By RavinderSingh13
Hello Ads89, Welcome to forums, thank you...
Hello Ads89,

Welcome to forums, thank you for using code tags around some of codes you have shown in your post, request you to please use code tags for all commands/codes/Inputs shown in your...
Showing results 1 to 8 of 8

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