Re: Passing variable to sed command.

2002-07-23 Thread drieux
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

Re: Passing variable to sed command.

2002-07-22 Thread drieux
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

Re: Passing variable to sed command.

2002-07-22 Thread David T-G
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

Passing variable to sed command.

2002-07-22 Thread kent ho
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 Thanks, Kent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]