Re: Facing problem with perl one-liner for single quote

2007-08-31 Thread Gunnar Hjalmarsson
John W. Krahn wrote: Gunnar Hjalmarsson wrote: John W. Krahn wrote: If the OP were on windows then he won't have been able to use single 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 T

Re: Facing problem with perl one-liner for single quote

2007-08-31 Thread Krishnan Hariharan
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" <[EMAIL PROTECTED]> wrote: > Gunnar Hjalmarsson wrote: > > John W. Krahn wrote: > >> Gunnar Hjalmarsson wrote:

Re: Facing problem with perl one-liner for single quote

2007-08-30 Thread John W. Krahn
Gunnar Hjalmarsson wrote: John W. Krahn wrote: Gunnar Hjalmarsson wrote: Use double-quotes instead, at least if you are on Windows. perl -pi"orig_*" -e "s/(TPOS_IN[^;]+)/$1 := '0'/" If you do that the shell will interpret $1 as one of its variables. Yes, a *nix shell will, so on *nix

Re: Facing problem with perl one-liner for single quote

2007-08-30 Thread Gunnar Hjalmarsson
John W. Krahn wrote: Gunnar Hjalmarsson wrote: Use double-quotes instead, at least if you are on Windows. perl -pi"orig_*" -e "s/(TPOS_IN[^;]+)/$1 := '0'/" If you do that the shell will interpret $1 as one of its variables. Yes, a *nix shell will, so on *nix you need \$1 If the OP wer

Re: Facing problem with perl one-liner for single quote

2007-08-30 Thread John W. Krahn
Gunnar Hjalmarsson wrote: Krishnan Hariharan wrote: I am trying a one-liner substitution for a content in a file. original file content - signal TCLK_IN : std_logic; signal TPOS_IN : std_logic; - I want to change it as: - signal TCLK_IN : std_logic; signal TPOS_IN : std

Re: Facing problem with perl one-liner for single quote

2007-08-30 Thread Gunnar Hjalmarsson
Krishnan Hariharan wrote: I am trying a one-liner substitution for a content in a file. original file content - signal TCLK_IN : std_logic; signal TPOS_IN : std_logic; - I want to change it as: - signal TCLK_IN : std_logic; signal TPOS_IN : std_logic := '0'; --- I

Re: Facing problem with perl one-liner for single quote

2007-08-30 Thread John W. Krahn
Krishnan Hariharan wrote: Hi all, Hello, I am trying a one-liner substitution for a content in a file. original file content - signal TCLK_IN : std_logic; signal TPOS_IN : std_logic; - I want to change it as: - signal TCLK_IN : std_logic; signal TPOS_IN : std_logic

Facing problem with perl one-liner for single quote

2007-08-30 Thread Krishnan Hariharan
Hi all, I am trying a one-liner substitution for a content in a file. original file content - signal TCLK_IN : std_logic; signal TPOS_IN : std_logic; - I want to change it as: - signal TCLK_IN : std_logic; signal TPOS_IN : std_logic := '0'; --- I wrote this one line