Quantcast
Channel: Reading a literal from stdin- Ambiguous redirect error when using EOF - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 3 View Live

Answer by Alexander Mills for Reading a literal from stdin- Ambiguous...

It turns out, all I needed to do, was do this: gmx --stdin <<EOF node e "console.log('foo')" EOF that would read the line starting with node as a string literal into the stdin of the gmx command.

View Article



Answer by Sergiy Kolodyazhnyy for Reading a literal from stdin- Ambiguous...

Original: < needs files or file descriptors, while you have command-substitution there, which replaces whatever backticks are with a string of text. For your purpose you might be better off using...

View Article

Reading a literal from stdin- Ambiguous redirect error when using EOF

I am trying to read a string literal into stdin using the following method: #!/usr/bin/env bash set -e; gmx --stdin < `cat <<EOF node e "console.log('foo')" EOF` when I run this, I get this...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images