Re: maledetti a capo!!
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
[pier@mordor /tmp]$ cat TEST
#commento1 linea 1
linea 2
#commento#
[pier@mordor /tmp]$ cat TEST | sed '/linea 1/{
> N
> s/\n/\\n/
> }'
#commento1 linea 1\nlinea 2
#commento#
--
Pierluigi De Rosa (thorin@durin.khazad-dum.net).
<< 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 debian-italian-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: