Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash-special characters in program arguments are not escaped #5

Open
Nindaleth opened this issue Apr 23, 2019 · 1 comment
Open

Bash-special characters in program arguments are not escaped #5

Nindaleth opened this issue Apr 23, 2019 · 1 comment

Comments

@Nindaleth
Copy link

Nindaleth commented Apr 23, 2019

Hi, thanks for making this. Nimcr is something that I use in probably all of my Nim sources.

I'm writing a tool to parse and sort some text data and it's similar to CSV, only it's separated by | pipes (and sometimes other characters), so I've made the column separator a parameter.

Giving the pipe symbol to the script doesn't really work, though, although it's quoted:

# running via nimcr, pipe unescaped - this may be a bug in how nimcr handles the params
$ ./sort.nim -d '|' -f 9 --mergeOutputs
sh: -f: command not found
SIGPIPE: Pipe closed.

# running via nimcr, pipe escaped - works at the moment
$ ./sort.nim -d '\|' -f 9 --mergeOutputs 
[OK]

# running the resulting binary, pipe unescaped
$ ./.sort -d '|' -f 9 --mergeOutputs
[OK]
@PMunch
Copy link
Owner

PMunch commented Apr 24, 2019

Interesting, unfortunately this might be hard to fix.. Shebangs are really quite brittle, so I suspect this is yet another issue with those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants