Re: Facing problem with perl one-liner for single quote
- From: krishnan_hariharan@xxxxxxxxxxx (Krishnan Hariharan)
- Date: Fri, 31 Aug 2007 00:25:55 -0700 (PDT)
Hello all,
Thanks for your help.
I tried using "\047" ASCII for the single quote in the
substitution and it worked.
The OS am using is Sun Solaris.
Regards,
HK.
--- "John W. Krahn" <krahnj@xxxxxxxxx> wrote:
Gunnar Hjalmarsson wrote:
John W. Krahn wrote:on Windows.
Gunnar Hjalmarsson wrote:
Use double-quotes instead, at least if you are
'0'/" <file_name>
perl -pi"orig_*" -e "s/(TPOS_IN[^;]+)/$1 :=
of its variables.
If you do that the shell will interpret $1 as one
able to use single
Yes, a *nix shell will, so on *nix you need \$1
If the OP were on windows then he won't have been
quotes for the original.
If I understood it correctly, he wasn't...
Krishnan Hariharan wrote:
>
> I wrote this one liner,
>
> perl -pi -e 's/signal TPOS_IN \:
std_logic;/signal
> TPOS_IN \: std_logic \:= \'0\';/' <file_name>
It looks like he was?
John
--
Perl isn't a toolbox, but a small machine shop where
you
can special-order certain sorts of tools at low cost
and
in short order. -- Larry
Wall
--
To unsubscribe, e-mail:
beginners-unsubscribe@xxxxxxxx
For additional commands, e-mail:
beginners-help@xxxxxxxx
http://learn.perl.org/
____________________________________________________________________________________
Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
.
- References:
- Re: Facing problem with perl one-liner for single quote
- From: John W. Krahn
- Re: Facing problem with perl one-liner for single quote
- Prev by Date: Re: Facing problem with perl one-liner for single quote
- Next by Date: Re: Logging STDERR and other output
- Previous by thread: Re: Facing problem with perl one-liner for single quote
- Next by thread: Re: Facing problem with perl one-liner for single quote
- Index(es):