[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNU sed Bug (Single Quotes in Comments Cause Errors)
From: |
Jonathan Levi MD |
Subject: |
GNU sed Bug (Single Quotes in Comments Cause Errors) |
Date: |
Mon, 5 Sep 2005 00:32:26 -0400 |
Sir/Madam:
Recently, a shell script of mine terminated with an apparently
erroneous error message. The following short script, followed by
terminal output, illustrates the problem:
----------Don't include this line!------------------------------
#!/sw/bin/bash
# littleBuggy.sh
#
#
# Created by Jonathan Levi, M.D. on 9/4/05.
# Copyright 2005 __MyCompanyName__. All rights reserved.
echo some text | sed '${
p # works if you'll delete the single quote!
}'
----------Don't include this line!------------------------------
Terminal output:
drj2:jonathan jonathan$ littleBuggy.sh
sed: -e expression #1, char 0: unmatched `{'
/Users/jonathan/bin/littleBuggy.sh: line 11: unexpected EOF while
looking for matching `''
/Users/jonathan/bin/littleBuggy.sh: line 12: syntax error: unexpected
end of file
GNU sed version 4.1.4; shell is
GNU bash, version 3.00.0(1)-release (powerpc-apple-darwin7.5.0)
Computer: Macintosh PowerBook G4 17" (PowerPc G44, 1.5 GHz)
Mac OS X: Version 10.3.9, build 7W98
Thank you for your attention to this,
Jonathan Levi, M.D.
- GNU sed Bug (Single Quotes in Comments Cause Errors),
Jonathan Levi MD <=