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

.local/bin/fnx: 17: [: unexpected operator #9

Open
strika opened this issue Oct 26, 2022 · 1 comment
Open

.local/bin/fnx: 17: [: unexpected operator #9

strika opened this issue Oct 26, 2022 · 1 comment

Comments

@strika
Copy link

strika commented Oct 26, 2022

This is what I get right after installing fnx.

❯ fnx
/home/user/.local/bin/fnx: 17: [: unexpected operator
Welcome to Fennel 1.2.1 on PUC Lua 5.3!
Use ,help to see available commands.
Try installing readline via luarocks for a better repl experience.
>> 

If I change the shebang in the script from #!/usr/bin/env sh to #!/usr/bin/env bash, I can use fnx.

Anything I can do to provide you more information?

@erikLundstedt
Copy link

erikLundstedt commented Feb 25, 2023

try running file $(which sh) and file $(which bash)
on my system(arch/archcraft) it is symlinked to bash

file $(which sh)
##;; -->/usr/bin/sh: symbolic link to bash

sidenote
bash, when executed as sh will run in a special mode according to the manpage:

If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible,
while conforming to the POSIX standard as well

$ man bash

on debian/ubuntu, it might be symlinked to debians dash
on some systems it might be installed as its own thing(not symlinked)

if just using #!/usr/bin/env bash works, I dont see much issue with using it like that.

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