Search Results

Search: Posts Made By: lojkyelo
22,946
Posted By lojkyelo
I can trust that the first column will never...
I can trust that the first column will never contain a comma within the "ABC" Internal ID field but not in the following fields, Name is likely suspect.

I tried you suggested command out, looks to...
22,946
Posted By lojkyelo
Using sed to remove a column from a CSV
I found that the following works to remove the first column in my file when my CSV is delimited with a simple comma:

sed -i 's/[^,]*,//' file.csv

However, I have a new file where the fields are...
1,633
Posted By lojkyelo
Agreed, but unfortunately in this instance Perl...
Agreed, but unfortunately in this instance Perl is not available.

---------- Post updated at 12:30 PM ---------- Previous update was at 10:43 AM ----------

After some further review, I realized...
1,633
Posted By lojkyelo
Help -- Modify awk command to handle "," delimiter
Currently I am using this command to split a CSV file based on the distinct values in the 16th (position) column.

awk -F, 'NR==1 { hdr=$0; next } $16 != prev { prev=name=$16;...
Showing results 1 to 4 of 4

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