Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-09-2012
Registered User
 
Join Date: May 2009
Posts: 91
Thanks: 6
Thanked 0 Times in 0 Posts
Delete " in my file

Hi, all I need to do is delete " from my file. Normally I would open this file and just delete it using the replace function but this file is massive and crashes my computer every time I open it.

So an example of my file looks like this (tab separated)


Code:
"joe" "jack" "bob"

and I want it to look like this


Code:
joe jack bob

Thanks
Sponsored Links
    #2  
Old 05-09-2012
Registered User
 
Join Date: Jan 2011
Posts: 45
Thanks: 12
Thanked 6 Times in 5 Posts

Code:
sed -e 's/\"//g' filename > newfile

or for inline editing:

Code:
sed -i -e  's/\"//g' filename

The Following User Says Thank You to brianjb For This Useful Post:
phil_heath (05-09-2012)
Sponsored Links
    #3  
Old 05-09-2012
joeyg's Avatar
joeyg joeyg is online now Forum Staff  
modérateur
 
Join Date: Dec 2007
Location: Out running a Marathon.
Posts: 2,191
Thanks: 48
Thanked 127 Times in 119 Posts
what about the tr command


Code:
tr -d '"'

should delete the " character
The Following 2 Users Say Thank You to joeyg For This Useful Post:
methyl (05-09-2012), phil_heath (05-09-2012)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need unix commands to delete records from one file if the same record present in another file... msathees Shell Programming and Scripting 6 05-08-2012 12:46 AM
Delete a pattern present in file 2 from file 1 if found in file 1. machomaddy Shell Programming and Scripting 5 02-26-2012 09:41 PM
Before I delete any file in Unix, How can I check no open file handle is pointing to that file? kchinnam Solaris 12 10-06-2010 02:30 PM
How to delete a string pattern in a file and write back to the same file mwrg Shell Programming and Scripting 1 11-18-2009 05:30 AM
Delete block of text in one file based on list in another file Festus Hagen Shell Programming and Scripting 3 09-03-2009 11:07 PM



All times are GMT -4. The time now is 02:55 PM.