Binary shift operators don't work
jclsn opened this issue · comments
jclsn commented
When I type
$ pcalc 20 < 1
bash: no such file or directory: 1
and
$ pcalc 20 << 1
heredoc>
Is this a bug or is the syntax wrong?
VittoDan commented
could it be a bash issue since the character "<" and the string "<<" are reserved for putting a file to stdin and for heredocs respectively?
A way to do it is to pass it as a string like so:
pcalc "20 << 3"
In this way the string is perceived as a single parameter instead of a bash redirect/heredoc
Mike Frysinger commented
yes, that error is from the shell. you need to quote the arguments
jclsn commented
Ah yeah thanks