[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inconsistent quote and escape handling in substitution part of param
From: |
Greg Wooledge |
Subject: |
Re: Inconsistent quote and escape handling in substitution part of parameter expansions. |
Date: |
Tue, 28 Feb 2012 11:18:40 -0500 |
User-agent: |
Mutt/1.4.2.3i |
On Tue, Feb 28, 2012 at 05:10:40PM +0100, John Kearney wrote:
> so for the test case the goal is to take a string like
> kljlksdjflsd'jkjkljl
> wrap it with single quotes and globally replace all single quotes in the
> string with '\''
Is this an SQL thing? Maybe you'd be better off using a language that
has an actual interface for database queries, including prepared
statements with variables and so on.
But if you insist:
imadev:~$ q=\'
imadev:~$ input="kljlksdjflsd'jkjkljl"
imadev:~$ echo "'${input//$q/$q\\$q$q}'"
'kljlksdjflsd'\''jkjkljl'
- Inconsistent quote and escape handling in substitution part of parameter expansions., lhunath, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Roman Rakus, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Chet Ramey, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Roman Rakus, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., John Kearney, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Greg Wooledge, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., John Kearney, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions.,
Greg Wooledge <=
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Roman Rakus, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Roman Rakus, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Greg Wooledge, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Roman Rakus, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Dan Douglas, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., John Kearney, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Dan Douglas, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., John Kearney, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., Dan Douglas, 2012/02/28
- Re: Inconsistent quote and escape handling in substitution part of parameter expansions., John Kearney, 2012/02/28