10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file of csv data, which looks like this:
file1:
1AA,LGV_PONCEY_LES_ATHEE,1,\N,1,00020460E1,0,\N,\N,\N,\N,2,00.22335321,0.00466628
2BB,LES_POUGES_ASF,\N,200,200,00006298G1,0,\N,\N,\N,\N,1,00.30887539,0.00050312... (10 Replies)
Discussion started by: djoseph
10 Replies
2. Linux
I have a .CSV file (file.csv) whose data are all enclosed in double quotes. Sample format of the file is as below:
column1,column2,column3,column4,column5,column6, column7, Column8, Column9, Column10
"12","B000QRIGJ4","4432","string with quotes, and with a comma, and colon: in... (3 Replies)
Discussion started by: dhruuv369
3 Replies
3. Shell Programming and Scripting
I have this csv file that I would like to sort on the 20th and 21st field. They are high lighted below. My challenge is that when I sort on those fields they are not in order as I would have liked. It seems like I have to pad those fields to the longest value in that fields data.
... (6 Replies)
Discussion started by: GroveTuckey
6 Replies
4. Shell Programming and Scripting
Hello people,
I am having problem to sort, sed and zero padding of column in csv file.
7th column only.
Input of csv file:
1,2,3,4,5,6,4/1/2010 12:00 AM,8
1,2,3,4,5,6,3/11/2010 9:39 AM,8
1,2,3,4,5,6,5/12/2011 3:43 PM,8
1,2,3,4,5,6,12/20/2009 7:23 PM,8
Output:... (5 Replies)
Discussion started by: sean1357
5 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement to append = in particular row in csv file. Data in csv is as follow:
row1,a,a,a
row2,b,b,b
row3,c,c,c
row4,d,d,d
csv should be modified at row3 and no. of columns are not fixed but rows are. output should be as:
row1,a,a,a
row2,b,b,b
row3,=c,=c,=c... (2 Replies)
Discussion started by: Divya1987
2 Replies
6. Shell Programming and Scripting
Hi
I have a date which I get as parameter. I want it to be added as first column in all the rows in a csv file.
I have tried the below code but no success.
date=$1
awk -F"," '{print $date","$0}' z3.csv > z4.csv
Could you tell the correct code for the above req.?
How to use code... (1 Reply)
Discussion started by: msp2244
1 Replies
7. Shell Programming and Scripting
I am working to import a file and have almost all the information accounted for except this last item. First of all the file name is the category and this is what I need to append to the file.
The catch I believe is the fact the file name has spaces in it.
Filename CPU Products.csv
File... (3 Replies)
Discussion started by: nkr1ptd
3 Replies
8. Shell Programming and Scripting
Hi,
I've internally searched through forums for about 2+ hours. Unfortunately, with no luck. Although I've found some cases close to mine below, but didn't help so much.
Actually, I'm in short with time. So I had to post my case. Hoping that you can help.
I have 2 files,
FILE1
... (0 Replies)
Discussion started by: amurib
0 Replies
9. Shell Programming and Scripting
Hi,
This is driving me nuts, can't think of any easy way to do it.
I need to append a string ".00" only in the third field of a file, and only if it does NOT have a decimal point already
Here is what the file looks like-
1400030846,2,17,POL GENERAL
1400030900,3,14.95,FIC GENERAL
If... (7 Replies)
Discussion started by: sfisk
7 Replies
10. Shell Programming and Scripting
Hi Guys,
I'm having a bit of a problem with a script, i need to get the day, month and day of month into a string, so i'm using:
CURRENT_DATE=`date +"%a %b %e"`
It is getting the correct date out, however it is not keeping the padding on the day of month. The %e is supposed to pad the day... (5 Replies)
Discussion started by: seanbyrne
5 Replies