понедельник, 22 апреля 2013 г.

unique escaping of ' in shell

if you need to escape single quote in a bash script, e.g. in bashrc:
alias='cool command with ' inside'
- you must replace it with '"'"'
i.e.:
alias='cool command with '"'"' inside'

p.s. explanation.

Комментариев нет:

Отправить комментарий