The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Finding SYmbols in LIB senthil_is HP-UX 1 05-08-2008 04:36 AM
new lines symbols in sed? gogogo Shell Programming and Scripting 1 11-21-2006 12:14 PM
Error When Print Accents edvaldo UNIX for Dummies Questions & Answers 0 07-31-2004 05:10 PM
cp first ~/bin what is ~ symbols importance in this. singh85 Linux 1 01-30-2004 03:56 PM
undefined symbols thalex High Level Programming 0 11-08-2001 12:37 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-06-2009
mierdatuti mierdatuti is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 20
remove accents and symbols with sed

Hi, I would like to know how could I remove accentes and the symbols: º and ª of a text file with sed. Whis this command doesn't works :-( sed "s/í/i/g" filename Many thanks and sorry for my english!
  #2 (permalink)  
Old 01-06-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,715
These characters are UTF-16?
  #3 (permalink)  
Old 01-06-2009
mitthan mitthan is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 7
Please use this command
sed -e "s/\º//g" -e "s/\ª//g" tt1.txt> tt2.txt

I have tested it with this input
tt1.txt input file contains
helªlo º helªlo2º
helªlo3º

output file tt2.txt comtains
hello hello2
hello3
  #4 (permalink)  
Old 01-06-2009
mierdatuti mierdatuti is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 20
Quote:
Originally Posted by mitthan View Post
Please use this command
sed -e "s/\º//g" -e "s/\ª//g" tt1.txt> tt2.txt

I have tested it with this input
tt1.txt input file contains
helªlo º helªlo2º
helªlo3º

output file tt2.txt comtains
hello hello2
hello3
Sorry doesn't work me In te text, the caracter ª if I do a vi it show me well, but when I do a sed from this text shows me a extrange caracter in substitusion to ª, it shows me a interrogation mark like inside of a sqare if I try to paste the line where the character is (ctrl+c, ctrl+v) but it shows: on - 8� Any help?
  #5 (permalink)  
Old 01-06-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,715
That's why we need to know your locale settings.
  #6 (permalink)  
Old 01-06-2009
mierdatuti mierdatuti is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 20
Quote:
Originally Posted by jim mcnamara View Post
That's why we need to know your locale settings.
avid@defekas:~$ echo $LANG es_ES.UTF-8 Thanks
  #7 (permalink)  
Old 01-06-2009
mitthan mitthan is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 7
sed -e 's/^[ ]*Width:[ ]*//' -e 's/[ ]*$//'`

try this way ..you need to change according to your format in the file
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:17 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0