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

"Syntax error: redirection unexpected" - script uses sh instead bash #6

Closed
fuzxi opened this issue Apr 22, 2019 · 1 comment
Closed

Comments

@fuzxi
Copy link

fuzxi commented Apr 22, 2019

Hello,
When I run polybar with the module, the following shows on my bar:
/bin/sh: 60: /home/user/git/polybar-kdeconnect/polybar-kdeconnect.sh: Syntax error: redirection unexpected

Line 60 is:
menu="$(rofi -sep "|" -dmenu -i -p "$1" -location $LOCATION -yoffset $YOFFSET -xoffset $XOFFSET -theme $THEME -width $WIDTH -hide-scrollbar -line-padding 4 -padding 20 -lines 5 <<< "Battery: $3%|Ping|Find Device|Send File|Unpair")"

I believe the issue is with the <<< operator. The script seems to be running in sh shell instead of bash. I do have bash installed, but neither #!/usr/bin/env bash nor #!/bin/bash affect the script.

I do have all the other dependencies installed.

My polybar config does include the space between . and the script path.

@fuzxi
Copy link
Author

fuzxi commented Apr 22, 2019

Fixed by symlinking bash to /bin/sh.
sudo ln -sf bash /bin/sh

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

1 participant