Berkeley CSUA MOTD:Entry 39195
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2005/8/19-22 [Computer/SW/Unix] UID:39195 Activity:nil
8/19    I have files full of  s that I NEED to squash, nothing I've tried
        works though. (shy of going in with an editor and deleting each one).
        They all exist at the beginning of a line and are followed by another
        strange charcter "»" if that helps.  OS = Linux.
        \_ sed is your friend.
        \_ tr -d
        \_ PERL baybee PERL!  It'll even copy the old file before modifying,
           from the command line!
        \_ awk me awk me awk awk awk
        \_ Any of many substitution processes
        \_ Have you tried emacs?
        \_ Do you know the hex/octal value of the strange character? od or
           hexdump might be of help to you. Then use tr -d to get rid of it.
        \_ perl -pi -e 's/^\xc2(?=\xbb)//' file1 file2 file3 ...
           --dbushong