' in bash alias 

>I just can't make the following alias works:
>
>mytestalias='awk -F'"' ...'
alias myt="awk -F'\"' ..."

Can't escape single quotes in a single-quoted string.

Chet Ramey

' in bash alias 

>I've tried
>
>mytestalias=awk -F'"' ...

Word-split at the unquoted space; also would not have protected the " from its special meaning when the alias gets expanded. Try:

alias mytestalias=awk\ -F'\"'\ ...
>mytestalias='awk -F\'\"\' ...'

Backslashes are not special within single-quoted strings; could use:

alias mytestalias='awk -F\" ...'

Ken Pizzini

documented on: 1999.10.09 Sat 13:45:34