Using sed
I have a huge list of phone numbers, each on its own line, in a single 130+MB text file.
I need to append (' to the beginning of each line and '), to the end.
sed, for whatever reason, doesn't like when I try:
Code:
sed -i 's/^/\(\'/' txt
it gives me a continuation prompt. After I enter a closing ' character, I get the error:
sed: -e expression #1, char 12: unterminated `s' command
However, if I try:
Code:
sed -i 's/^/\(/' txt
it works as expected. For whatever reason, I'm not allowed to escape the ' character in the first example.
Can anyone tell me what I'm doing wrong?
bryceowen, September 29th, 2009 07:07 PM
Bookmarks