On Wed, May 22, 2002 at 11:16:48AM +0200, -={Sh~AB}=- wrote: > no cosi' inserisce ^ nella nuova linea : > > #commento1 [..] > > > > ma in questo modo togli tutti i commenti. > > ops... > > for i in `cat nomefile`;do > str=`echo $i|grep ^#` > if [ "$str" == "" ];then > echo $i|tr '\n' "@" |sed 's/@/\\n/g' >>nuovofile > else > echo $str >>nomefile > fi > done
[EMAIL PROTECTED] /tmp]$ cat TEST #commento1 linea 1 linea 2 #commento# [EMAIL PROTECTED] /tmp]$ cat TEST | sed '/linea 1/{ > N > s/\n/\\n/ > }' #commento1 linea 1\nlinea 2 #commento# -- Pierluigi De Rosa ([EMAIL PROTECTED]). << LINUX: the choice of a GNU generation >> << For my real address... ask the Balrog. >> * Sostenete la Lega per la Soppressione dei Troll * -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]