|
Home | Search Forums | Register | Forum Rules | Man Pages | Unix Commands | Linux Commands | FAQ | Members | Today's Posts |
Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here. |
unix and linux commands - unix shell scripting |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Batch file to remove double quotes from a file
Hi I have to create a windows batch file which will read an input file and remove "double quotes" from each line of the file. For eg.If input file name is abcd.csv and contents is : Code:
"asasd,123123,213213,asd" "esfrf,dsfsdf,234324,sdfsdf" Then the batch file should remove "" from the start and end of the line and output file should be: Code:
asasd,123123,213213,asd esfrf,dsfsdf,234324,sdfsdf Plz help Thanks |
Sponsored Links | ||
|
#2
|
|||
|
|||
sed 's/"//g' filename
|
Sponsored Links | ||
|
#3
|
|||
|
|||
I have to use a windows batch file to execute this.
This command is used in Unix I guess.. Thanks |
#4
|
|||
|
|||
Akashtcs you can even use a unix machine to remove double quotes, first transferring ur file to unix machine then applying above SED command. Then FTP ur csv files to windows machine. Once i needed to substitute "/" with "\\" as windows accept "\\" instead of "/" in property files and i used this method
|
Sponsored Links | |
|
#5
|
|||
|
|||
Do you have perl in your windows server? Code:
perl -i.bak -pe 's/"//g' file.bat |
Sponsored Links | |
|
#6
|
|||
|
|||
No dont have perl in the system,
Also cant do it by transferring the file to unix and doing it... There must be something simple in windows to read file line by line and replace a character. |
Sponsored Links | |
|
|
||||
Thread | Thread Starter | Forum | Replies | Last Post |
replace value with double quotes of specific coulmn value in csv file | techmoris | Shell Programming and Scripting | 3 | 08-03-2009 10:37 PM |
Removing double quotes in a file | kingofprussia | UNIX for Dummies Questions & Answers | 3 | 12-19-2008 05:28 AM |
How to remove a character which is enclosed in Double quotes | mohan_tuty | UNIX for Advanced & Expert Users | 3 | 06-16-2008 12:55 PM |
Remove double quotes | deepakwins | UNIX for Dummies Questions & Answers | 3 | 05-30-2008 12:53 PM |
Double quotes or single quotes when using ssh? | password636 | Shell Programming and Scripting | 3 | 05-29-2008 09:52 PM |
|