sed/grep problems

Gerhard Moeller Gerhard.Moeller at arbi.informatik.uni-oldenburg.de
Thu Feb 14 01:35:40 AEST 1991


claus at 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 at arbi.informatik.uni-oldenburg.de                   |
|BITNET: gmoeller%arbi.informatik.uni-oldenburg.de at DOLUNI1 (106495 at DOLUNI1) |
+-----------------------> the medium is the message <-----------------------+



More information about the Comp.unix.questions mailing list