On Monday, July 22, 2002, at 02:38 , kent ho wrote:
> Thanks,
>
> Kent
I will admit that I pulled out my copy of the
O'Reilly "Sed and Awk" - which I would recommend
if you are going to be in that space long.
Alternatively, you might look into perl
open(IN, "$file") or "die unable to
On Monday, July 22, 2002, at 10:21 , kent ho wrote:
> Hi All,
> Just a generic "sed" question, please help.
>
> How do I pass a variable to this sed command:
>
> MONTH="Mar"
> sed '/$MONTH/,$d' foo > foo.new
#!/bin/sh
d="231"
MONTH="Mar"
sed '/'$MONTH'/,$d' foo
Kent --
...and then kent ho said...
%
% Hi All,
% Just a generic "sed" question, please help.
Don't you think, then, that you'd be more likely to get a useful answer
on a sed list?(!!?)
%
% How do I pass a variable to this sed command:
%
% MONTH="Mar"
% sed '/$MONTH/,$d' foo > foo.new
Use