Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...One of the best run forums I have used in years! ...I like the way the site is organized and your no tolerance of flames..."

Geography

Where in the world do Tek-Tips members come from?

How do I get rid of strange characters

cristi (Programmer)
6 Apr 00 8:24
I have inside a text file several words with strange characters (ex: HE^@^@^@^@^@^@^@^@^@^@^@^@LLO).If I try to print the text file everything that's on the right of those strange chars on the line is not printed. If I want to get the word HELLO, AWK returns it "HELLO", but with length = 17 chars. I tried also to get the char's ASCII code but it doesn't seem to have one!
bigscouse (MIS)
6 Apr 00 11:43
Not quite sure what you are asking but if you just want to physically remove the rubbish and leave the word HELLO in the file then you can pass the command s/HE.*LLO/HELLO/ in vi or if you need to do it from the command line or in a shell script, try:-
cat rubish_file ¦ sed 's/HE.*LLO/HELLO/g' > hello_file

Hope that helps.

Ged Jones
gedejones@hotmail.com

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close