[Solved] delete character in vi file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [Solved] delete character in vi file
# 1  
Old 04-26-2012
[Solved] delete character in vi file

I have a file with lots of unnecessary double quotes ("). I tried to remove them but not successful.

Please assist. Thanks!
# 2  
Old 04-26-2012
It's easier with the unix tr command.

Code:
cat oldfile | tr -d '"' > newfile

This User Gave Thanks to methyl For This Post:
# 3  
Old 04-26-2012
In vi:

Code:
<ESC> :%s/"//g

This User Gave Thanks to gary_w For This Post:
# 4  
Old 04-26-2012
Thank you!!!!

Quote:
Originally Posted by methyl
It's easier with the unix tr command.

Code:
cat oldfile | tr -d '"' > newfile

This User Gave Thanks to onlinelearner02 For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Count specific character of a file in each line and delete this character in a specific position

I will appreciate if you help me here in this script in Solaris Enviroment. Scenario: i have 2 files : 1) /tmp/TRANSACTIONS_DAILY_20180730.txt: 201807300000000004 201807300000000005 201807300000000006 201807300000000007 201807300000000008 2)... (10 Replies)
Discussion started by: teokon90
10 Replies

2. Shell Programming and Scripting

Delete Numbers, Spaces, Special Character from the begining of the line of a file

Hi All, I want to keep the name of the songs with their respective extensions only. Sample Code ======== 03 Choti choti gaiya choti choti gaval.mp3 03---Brazil Dhol.mp3 03 PAYALIYA .mp3 04 - Isq Risk .mp3 04%20-%20Oh%20My%20Love(wapking.in).mp3 08 - A2 - Aasan Nahin Yahan .mp3 AE... (3 Replies)
Discussion started by: Pramod_009
3 Replies

3. AIX

[Solved] Not able to delete/create file in /tmp

This is AIX box and I am not able to create or delete file in /tmp though space is there root@ttcols01/ #touch /tmp/test_file touch: 0652-046 Cannot create /tmp/test_file. root@ttcols01/ #mkdir /tmp/test_dir mkdir: 0653-358 Cannot create /tmp/test_dir. /tmp/test_dir: Invalid file system... (9 Replies)
Discussion started by: solaris_1977
9 Replies

4. Shell Programming and Scripting

Sed: delete on each line before a character and after a character

Hi there, A total sed noob here. Is there a way using sed to delete everything before a character AND after another character on each line in a file? The deletion should also delete the indicating characters(here: an opening and a closing parenthesis). The original file would look like... (3 Replies)
Discussion started by: bnbsd
3 Replies

5. Shell Programming and Scripting

Delete parts of a string of character in one given column of a tab delimited file

I would like to remove characters from column 7 so that from an input file looking like this: >HWI-EAS422_12:4:1:69:89 GGTTTAAATATTGCACAAAAGGTATAGAGCGT U0 1 0 0 ref_chr8.fa 6527777 F DD I get something like that in an output file: ... (13 Replies)
Discussion started by: matlavmac
13 Replies

6. Shell Programming and Scripting

Delete last character in dos file

Hi, I am creating a file using an unix script and then converting it to dos format. After conversion a ^Z character is added at the end of file. I want remove this last ^Z character. Can anyone please tell me how to do this? Thanks a lot. Sunil (7 Replies)
Discussion started by: ssmallya
7 Replies

7. Shell Programming and Scripting

How to delete a character at the end of a file.

I am having a file which has data like this:- 1,2,3,4,5, But I need to remove the last comma from this file. So the data should be like 1,2,3,4,5 The command I tried was temp=`cat ${FileName}.txt` len=`awk '{print length($0)}' ${FileName}.txt` len=`expr $len - 1` ... (12 Replies)
Discussion started by: rony_daniel
12 Replies

8. Shell Programming and Scripting

delete a special character in file

hi i want to delete a particular character in file. example file name:abcsample abc=bbbqw3/ hidh=ajjqiwio4/ xyx=hakjp/ ........../ ......./ i want to delete that special character (/) in abcsample file Permnently.please give the required commands for my requirement. required... (1 Reply)
Discussion started by: srivsn
1 Replies

9. Shell Programming and Scripting

delete a special character in file

hi i want to delete a particular character in file. example file name:abcsample abc=bbbqw3/ hidh=ajjqiwio4/ xyx=hakjp/ ........../ ......./ i want to delete that special character (/) in abcsample file.please give the required commands for my requirement. thank you (3 Replies)
Discussion started by: srivsn
3 Replies
Login or Register to Ask a Question