I have tried many things, but I'm new to the shell. Is it possible to have both double and single quotes within an echo?I want to generate echo scan 'LPV',{FILTER => (PrefixFilter ('MP1-Eq1')} for system call, but I am getting an error because of the mutiple double and single quotes.ftable=echo  \ scan   'LPV',{FILTER =>  \ \( PrefixFilter \('MP1-Eq1' \) \ \} \     echo scan 'LPV',{FILTER => (PrefixFilter ('MP1-Eq1')}bash: syntax error near unexpected token `('How can I write scan 'LPV',{FILTER => (PrefixFilter ('MP1-Eq1')}? The syntax is hbase's and I can't change it...EDITI want to call echo within system call. ftable=echo scan 'LPV',{FILTER => (PrefixFilter ('MP1-Eq1')} system(ftable)errorI have tried with $ butftable=echo $'scan \' LPV \' ,{FILTER =>  \ (PrefixFilter ( \' MP1-Eq1 \' ) \ }' 'system(ftable)errorGetting an error because of double quote.
How do I echo an expression with both single and double quotes?
shell;quoting;echo
In bash:echo $'scan \'LPV\',{FILTER => (PrefixFilter (\'MP1-Eq1\')}'orecho scan 'LPV',{FILTER => \(PrefixFilter ('MP1-Eq1')\}'For longer strings this may be a more convinient alternative:> cat <<EOTscan 'LPV',{FILTER => (PrefixFilter ('MP1-Eq1')}EOTwith EOT or \EOT, depending on whether parameter expansion and quote removal (backslash) are intended or not.Usage within awkDefining this string within awk would make everything even more complex. This should be done outside awk in the shell:ftable=$'echo scan \'LPV\',{FILTER => (PrefixFilter (\'MP1-Eq1\')}'# echo $ftableawk -v ftable=$ftable '... system(ftable); ...'