シェルスクリプト総合 その7
■ このスレッドは過去ログ倉庫に格納されています
0735名無しさん@お腹いっぱい。
2007/01/16(火) 23:37:40シングルクオートの場合はシェルに持ってかれないので\一つでOK。
こんな感じでシェルを介さなければ\一つでいける。
> cat replace.sed
s/aaa/aaa \
bbb \
ccc/
> sed -f replace.sed hoge.dat
aaa
bbb
ccc
>
SH(1)
> Double Quotes
> Enclosing characters within double quotes preserves the literal
> meaning of all characters except dollarsign (`$'), backquote
> (``'), and backslash (`\'). The backslash inside double quotes
> is historically weird. It remains literal unless it precedes the
> following characters, which it serves to quote:
> $ ` " \ \n
■ このスレッドは過去ログ倉庫に格納されています