claus@iesd.auc.dk (Claus S. Jensen) (02/13/91)
I'm looking for a way to do some things concerning the tab-symbol. 1) I would like to find occurences of tab (\t) in a file. grep "\t" <file> doesn't work. 2) And I would like to use sed to replace these tabs with spaces. sed -e "s/\t/ /g" <file> doesn't work. If anybody know anything about this please answer the questions. Claus S.Jensen -- ######################################################################## # Claus S.Jensen , claus@iesd.auc.dk # Superman on Deep Trouble MUD # # University of Aalborg, Denmark # krikand.iesd.auc.dk 2000 # ########################################################################
Gerhard.Moeller@arbi.informatik.uni-oldenburg.de (Gerhard Moeller) (02/13/91)
claus@iesd.auc.dk (Claus S. Jensen) writes: > I'm looking for a way to do some things concerning the tab-symbol. >1) I would like to find occurences of tab (\t) in a file. > grep "\t" <file> doesn't work. >2) And I would like to use sed to replace these tabs with > spaces. > sed -e "s/\t/ /g" <file> doesn't work. Use the <tab> instead of \t. But... if it doesn't accept the <tab>, you have to write a file with: sed 's/ /bla/g' < $1 > $1.bla It's tested on SVR3.2 We have joy we have fun we have pucman for the sun. gerhard. -- +---------------------------< principiis obsta! >---------------------------+ | Gerhard Moeller, Teichstrasse 12, 2900 Oldenburg (FRG) [Geb. 02/21/68] | | inhouse: faramir!gemoe uucp: ...(unido!)uniol!gmoeller | |DOMAIN: gerhard.moeller@arbi.informatik.uni-oldenburg.de | |BITNET: gmoeller%arbi.informatik.uni-oldenburg.de@DOLUNI1 (106495@DOLUNI1) | +-----------------------> the medium is the message <-----------------------+