[Nix-dev] How to escape $'\t' in Nix multi-line string?
Bjørn Forsman
bjorn.forsman at gmail.com
Sun Apr 30 15:07:41 CEST 2017
On 30 April 2017 at 15:01, Bjørn Forsman <bjorn.forsman at gmail.com> wrote:
> Hi all,
>
> I'm stuck trying to pass $'\t' to bash via Nix multi-line strings:
>
> nix-repl> ''cut -d $'\t' -f 1''
> error: syntax error, unexpected $undefined, expecting IND_STR or
> DOLLAR_CURLY or IND_STRING_CLOSE, at (string):1:10
Oh, it was only missing double single-quotes before the dollar sign.
What tripped me was that the documentation says ${ is special in
strings, not $'.
Best regards,
Bjørn Forsman
More information about the nix-dev
mailing list