Unix Shell - Question about the w command of sed

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > November 2006 > Question about the w command of sed





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Question about the w command of sed
Spiros Bousbouras

2006-11-30, 7:23 pm

When I type
sed -n '{N;w file1}' file2
I get
sed: -e expression #1, char 0: Unmatched `{'

The problem is that sed thinks that the } is part
of the filename I want to write to. So how do I
tell it this is not the case ?

Stephane CHAZELAS

2006-11-30, 7:23 pm

2006-11-30, 16:11(-08), Spiros Bousbouras:
> When I type
> sed -n '{N;w file1}' file2
> I get
> sed: -e expression #1, char 0: Unmatched `{'
>
> The problem is that sed thinks that the } is part
> of the filename I want to write to. So how do I
> tell it this is not the case ?

[...]

sed -ne '{N;w file1' -e '}' < file2

--
Stéphane
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com