If you are using, ksh93
, zsh
or bash
, you can use the $'...'
ksh-extension, which does C-style backslash escape interpretation inside the quoted string:
csplit --silent --prefix=email-emailbad.txt- --digits=3 \
emailbad.txt $'/^\.\r/+1' '{*}'
Otherwise, you can use printf
to create the string, in a very similar way:
csplit --silent --prefix=email-emailbad.txt- --digits=3 \
emailbad.txt "$(printf '/^\.\r/+1')" '{*}'