how to remove weird symbols


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to remove weird symbols
# 1  
Old 05-12-2009
how to remove weird symbols

Hi my file is suffering from some weird text symbols like a question mark inside of a square. I don't know how to remove these. I tried to remove UTF accents with command
sed -e 's/^[ ]*Width:[ ]*//' -e 's/[ ]*$//'`
but no use
. Could u guyz plz help me.
# 2  
Old 05-12-2009
this what i used to do to remove such weird characters

- go to vim
- then go to that particular character press "ga" ( will show you hex / octal values )
- close the file.
- perl -pi -e 's/\x(hex value)//g' <filename>

this may not be the best way to do what you wanted but it works for me.
# 3  
Old 05-12-2009
It showing error
syntax error near unexpected token new line
# 4  
Old 05-12-2009
Can you tell what does the below command o/p

Code:
sed -n "l" filename

cheers,
Devaraj Takhellambam
# 5  
Old 05-12-2009
Hi

I solved it
Thanx
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Errno.h symbols

Hi, I need to look at a recent copy of /usr/include/errno.h from AIX 7.2 to check some symbols. In particular, I'm curious if it defines EOWNERDEAD and ENOTRECOVERABLE. Can someone who has access to 7.2 please check for me? Thanks! (1 Reply)
Discussion started by: topcat
1 Replies

2. Shell Programming and Scripting

awk to remove line if field has symbols in it

Trying to use awk to remove a line only if $1 contains either ; or :. Thje awk below runs but no lines are removed. Thank you :). awk awk '$1 !~ /;/ || $1 !~ /:/ { print }' file file AARS2;TMEM151B 1 AASS 2 ABAT 3 ABCA1 3 ABCA10 1 ABCA12 2 ABCA13 1 ABCA13:AX746840 2 ABCA2 5 (5 Replies)
Discussion started by: cmccabe
5 Replies

3. UNIX for Dummies Questions & Answers

Help with understanding the symbols '~#' and '~$'

I noticed that sometimes there is "~#" or "~$" in the terminal. What is that? I can't make any research in google because I don't know what are they called. I even tried reading pdf's or books but unfortunately, I wasn't lucky to find out. Maybe I was not persistent enough but I am really... (3 Replies)
Discussion started by: chams
3 Replies

4. Programming

cc -- Unsatisfied symbols -- on HP-UX 10.2

Greetings, I am slowly learning a few things but am far from being an expert. I am at the point now that I would like to be able write some ANSI C code on HP-UX 10.2. Just a hobbie... I am just using cc, which came with the HP-UX 10.2 ... I don't have the manuals for the development... (7 Replies)
Discussion started by: Dirk_
7 Replies

5. Shell Programming and Scripting

redirecting symbols

Can anyone please tell me what the following do 1. < 2. << Thanks Calypso (1 Reply)
Discussion started by: Calypso
1 Replies

6. AIX

Unresolved symbols

Hello experts , i have some strange problem, i wanted to create a shared object in AIX 5.3 for which i have compiled all my .cxx to .o which worked fine and then i created the .so from them , but when i do nm -Bo sample.so , i have many unresolved symbol, including printf... (0 Replies)
Discussion started by: vin_pll
0 Replies

7. Shell Programming and Scripting

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! (7 Replies)
Discussion started by: mierdatuti
7 Replies

8. Shell Programming and Scripting

new lines symbols in sed?

I want to edit a huge script file using sed. How can I add the new lines symbols in the red colored places? sed -e "s/test -z "$x"/if test -z "$x" then echo -1; \n else \n/g" (1 Reply)
Discussion started by: gogogo
1 Replies

9. Linux

cp first ~/bin what is ~ symbols importance in this.

What would be the importance of ~ in this command. cp first ~/bin Thanks from dumb (1 Reply)
Discussion started by: singh85
1 Replies

10. Programming

undefined symbols

i am trying to compile transcode on AIX v 4.3.3 with gcc 3.0.1 i am getting this error: gcc -shared -o .libs/libexport_null.so.0 export_null.o -lpthread -ldl -lc -Wl,-bnoentry -Wl,-bexport:.libs/libexport_null.exp ld: 0711-317 ERROR: Undefined symbol: capability_flag ld: 0711-317... (0 Replies)
Discussion started by: thalex
0 Replies
Login or Register to Ask a Question