Search Results

Search: Posts Made By: rspwilliam
2,065
Posted By rspwilliam
Hi Singh, The code should work but in for my...
Hi Singh,

The code should work but in for my csv its not working , But when i create sample dummy file its work perfect , some ASCII issue required help on that
2,065
Posted By rspwilliam
Awk code and sample data
fields=$(sed -r -e 's/-1/ /g' -e 's/,/ FS /g' \
-e 's/([0-9]+)/\$\1/g' control_file.txt)


The first command converts control_file.txt into a suitable awk command like below,
control file...
2,065
Posted By rspwilliam
Comma separate issue in UNIX
In awk the field seprator is not working properly, I am trying to cut the fields from the file based on the delimiter example comma (,)

awk -F, "{print {$1 FS $3 FS $5 FS FS $2}}" Sample.csv
...
Showing results 1 to 3 of 3

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