Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
How about some negative matching, like: s/[^\t-~]//g Replace anything that's not between a tab (ASCII #9) and a tilde (ASCII #126). Disclaimer: I don't know sed... maybe you have to escape the brackets? There's probably also some nomenclature for specifying an ASCII character code, but I couldn't find it in my references. Maybe consult the man page for advanced regular expressions? -- Chris Janicki 781-662-9424 Industrious Activities, Inc. http://www.ia-inc.com >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< On 4/5/01, 8:15:48 PM, John Whitfield <john_whitfield at email.com> wrote regarding Script troubles.: > Hullo, > I'm having trouble with a UNIX script (K-shell in HP-UX) and was hoping > someone could help. I've got a file I'm trying to send that has bad > characters in it (ASCII 142). I could write a C program, but I'm trying to > avoid that. Is there a way I could get a shell command to do something like > this: > cat infile.dat | sed "s/<<junk>>/<<blank>>/g" > outfile.dat > The stream editor is easy enough, but I can't seem to get it to recognize > the bad character. Any ideas? > AdvThanxance, > John Whitfield > ----------------------------------------------- > FREE! The World's Best Email Address @email.com > Reserve your name now at http://www.email.com > - > Subcription/unsubscription/info requests: send e-mail with > "subscribe", "unsubscribe", or "info" on the first line of the > message body to discuss-request at blu.org (Subject line is ignored). - Subcription/unsubscription/info requests: send e-mail with "subscribe", "unsubscribe", or "info" on the first line of the message body to discuss-request at blu.org (Subject line is ignored).
BLU is a member of BostonUserGroups | |
We also thank MIT for the use of their facilities. |