10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi have a comma separated file which has numeric and string columns. String columns are quoted and can have comma in between the quotes. How to identify the columns with FS =","
sample records"prabhat,kumar",19,2000,"bangalore,India"
In awk it should be$1 = prabhat,kumar
$2=19
$3=2000... (9 Replies)
Discussion started by: prabhat.diwaker
9 Replies
2. Shell Programming and Scripting
Source 1
column1 column2 column 3 column4
1,ganesh,1,000,1
222,ram,2,000,5
222,ram,50,000,5
33,raju,5,000,7
33,raju,5,000,7
33,raju,5,000,8
33,raju,5,000,4
33,raju,5,000,1
In my .csv file, third column is having price value with comma (20,300), it has to be considered 1,000 as... (1 Reply)
Discussion started by: Ganesh L
1 Replies
3. Shell Programming and Scripting
Hello there,
I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process.
Input in the csv file is ,
1,234,"abc,12,gh","GH234TY",34
I need output like below,... (8 Replies)
Discussion started by: Uttam Maji
8 Replies
4. Shell Programming and Scripting
Hi All,
I have a unix shell script file as below.
My task is
a)to replace 248 to 350 and need to create a new file as BW3_350.sh
b)to replace 248 to 380 and need to create a new file as BW3_380.sh
c)to replace 248 to 320 and need to create a new file as BW3_320.sh
there is no... (6 Replies)
Discussion started by: karthi_mrkg
6 Replies
5. UNIX for Dummies Questions & Answers
Hi all !
I have a fasta file that looks like that:
>Sequence1
RTYIPLCASQHKLCPITFLAVK
(it's just an example, obviously in reality I have several pairs of lines like that)
Using UNIX command(s), would it be possible to replace all the characters except the "C" of the second line only by... (7 Replies)
Discussion started by: Cevin21
7 Replies
6. Shell Programming and Scripting
Hello,
I need to read a csv file and I am trying to replace a comma with a text DSEE?DSEE.
Example
Input
"Chapter","NewTrains, "oldTrains","Delayed",10,"London"
"Chapter","Newbuses,oldbuses","On Time",20,"London"
Output
"Chapter","NewTrainsDSEE?DSEE... (5 Replies)
Discussion started by: venkatvani
5 Replies
7. UNIX for Advanced & Expert Users
Hi All,
Could some one help me on one of my requirement below:
I have a sequential file with 4fields in it and it is a comma (,) seperated file.
Delimeter is 'comma'.
But in of the file column for ex: 3rd column it is 'Description' (column name) I am getting the values with commas.... (6 Replies)
Discussion started by: eskay_s
6 Replies
8. Shell Programming and Scripting
Hi All,
Please give me the solution to the following ASAP.
1) Converting the .xls into .csv
Script i tried,
mv hello.xls hello.csv
The above given script converting the .xls file into .csv successfully. But after i run the below unix command I am no able to open the .csv file, its giving... (4 Replies)
Discussion started by: velava
4 Replies
9. Shell Programming and Scripting
Hi this is my first time posting ever. I'm relatively new in using AWK/SED, I've been trying many a solution. I'm trying to replace the 59th column in a file where if I encounter '' then I would like to replace it with the word NULL.
example
0 , '' , '' , 0 , 195.538462
change it to
0... (5 Replies)
Discussion started by: gumal901
5 Replies
10. Shell Programming and Scripting
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies