Subject: Off topic, read if you want to
To: None <port-mac68k@NetBSD.ORG>
From: Greg Evans <macguru@concord.televar.com>
List: port-mac68k
Date: 03/26/1997 02:16:08
I realize that this is *very* off topic, however everyone here has helped
me in the past, so I'll as those I consider friends first.
I am trying to use 'sed' to go through a file and replace all occurrences
of the '&' character with a <newline> or <return>, so that text like this:
email_address=username@isp.com&computer_type=Macintosh&Modemspeed=288
will look like this:
email_addres=username@isp.com
computer_type=Macintosh
Modemspeed=288
I have been using the following:
sed s/\&\/\n\/g filename >filename2
sed s/\&\/\\n\/g filename >filename2
as well as many undocumented attempts at this. The result always seems to
be:
email_address=username@isp.comncomputer_type=MacintoshnModemspeed=288
As you see the '&' gets replaced but not with the '\n' (newline?) but with
the character n.
Help please....
Regards,
Greg Evans