www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/02/14:01:05

From: Ian Chapman <ichapman AT nortelnetworks DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: sed
Date: Tue, 02 Feb 1999 13:41:51 -0500
Organization: Nortel
Lines: 17
Message-ID: <36B746EF.1CEB499@nortelnetworks.com>
NNTP-Posting-Host: bcarib90.ca.nortel.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.06 [en] (Win95; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,
	I'm having a problem understanding what I'm doing wrong.

sed {s/\n/\t/ s/xyz/\n/} temp.txt | less

	I need to convert all the new lines to tab and then xyz to a new line. 
It does not like the { 
... -e expression #1, char 0: Unmatched {

	In addition it does not like \n in the pattern string and when \n is in
the replace string I get a n in place of a new line.

	I thought I'd understood about regular expressions.

	Any ideas would be a great help.

		Regards Ian.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019