Replace 2nd column of CSV file with numbers on line
I have a csv file with occasional multiple entries in the second column.
I want the result
I know I can get the output of the second column with awk but I am having trouble with bin/bash using regex to replace the remainer of the lines correctly
Last edited by ffdstanley; 09-04-2011 at 02:38 PM..
Reason: Code tags!
Hi All,
i have a csv file .
In the 7th column i have data that has line feed in it.
Requirement is to remove the line feed from the 7th column whenever it appears
There are 11 columns in the file
C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11
The value in C7 contains line feed ( Alt + Enter ),... (2 Replies)
Hi experts,
My csv file looks like this
U;cake;michael;temp;;;;
U;bread;john;temp;;;;
U;cocktails;sarah;temp;;;;
I'd like to change the value fo 2nd column to cf+random number , which will look maybe something like this
U;cf20187;michael;temp;;;;
U;cf8926;john;temp;;;;... (7 Replies)
Hi All
I have one query,say i have a requirement like the below code should be
move to diffent files whose maximum lines can be of 10 lines.Say in the below example,it consist of 14 lines.
This should be moved logically using the data in the fisrt coloumn to file1 and file 2.The data of first... (2 Replies)
I have following entries file abc.txt
abc83.out.remote TRUE
abc84.out.remote TRUE
abc85.out.remote TRUE
abc86.out.remote TRUE
Please help me, how do i toggle the entries listed in 2nd column based on the search patterns (abcxx)
abcxx, i can get... (14 Replies)
I have a file
cat 1.txt
AAAA , BBBB , CCCC , DDDD
DFDF , DFDF , DFDF , FDDD
AA11 , DFDF , 0000 , UTIO
ADSD , WERT, 0000 , JKJL
If the 3rd column is not equal to "0000" , then it should replace "0000" with "XXXX" and if its equal to "0000" then print the line as it is.
need help. (9 Replies)
Hello,
Got a CSV file which contains 21 columns
Need to convert the file to Pipe delimiter and Few columns text data contains new line
Example
1,2,3,"ABC" 8" ABC,5,6,7
1,2,3,"ABC"
8" ABC,5,6,7 ( New Line)
1,2,3,""ABC" 8" ABC", 5,6,7
1,2,3,"ABC"
,5,6,7(New line)
Expected... (8 Replies)
Hello,
I am trying to make a awk code that will take 2 files, a txt file like this :
1 1 88 c(1:38, 42, 102)
2 2 128 c(39:41, 43:101, 103:105, 153, 155:189, 292, 344:369)
3 3 84 c(190:249, 603, 606:607, 609:629)
4 4 12 ... (8 Replies)
hi
I have 2 file with more than 10 columns for both
1st file
apple,0,0,0......
orange,1,2,3.....
mango,2,4,5.....
2nd file
apple,2,3,4,5,6,7...
orange,2,3,4,5,6,8...
watermerlon,2,3,4,5,6,abc...
mango,5,6,7,4,6,def.... (1 Reply)