Bad substitution -> Syntax error #416

Closed
opened 2023-12-23 14:26:22 +01:00 by catroc · 13 comments
catroc commented 2023-12-23 14:26:22 +01:00 (Migrated from github.com)

Linux Distribution

Raspi 4 - bookworm

What happened

Just want to start KIAUH ...

Gives me:

kiauh.sh: 16: Bad substitution
kiauh.sh: 14: -/scripts/backup.sh: Syntax error: "(" unexspected

What did you expect to happen

Well ... starting KIAUH ^^

How to reproduce

sh ./kiauh/kiauh.sh

Additional information

I have installed it many times, tried an new image and a new sd card ...
Same problem when I install over git or copy it with winscp.

### Linux Distribution Raspi 4 - bookworm ### What happened Just want to start KIAUH ... Gives me: ``` kiauh.sh: 16: Bad substitution kiauh.sh: 14: -/scripts/backup.sh: Syntax error: "(" unexspected ``` ### What did you expect to happen Well ... starting KIAUH ^^ ### How to reproduce `sh ./kiauh/kiauh.sh` ### Additional information I have installed it many times, tried an new image and a new sd card ... Same problem when I install over git or copy it with winscp.
pardovot commented 2024-01-21 09:14:47 +01:00 (Migrated from github.com)

Same issue, after each time I restart the system or something this goes corrupted.

Same issue, after each time I restart the system or something this goes corrupted.
itsj commented 2024-01-27 16:14:10 +01:00 (Migrated from github.com)

Same issue for me. Installation via git. Can anyone solve it? I tried it several times. I use unbuntu Server (Ubuntu 22.04.3 LTS).

Same issue for me. Installation via git. Can anyone solve it? I tried it several times. I use unbuntu Server (Ubuntu 22.04.3 LTS).
itsj commented 2024-01-27 18:32:16 +01:00 (Migrated from github.com)

I found a solution that works for me. You need to start the script from your home directory
./kiauh/kiauh.sh
Before that I launched it in the Kiauh directory.
Hope that helps.

I found a solution that works for me. You need to start the script from your home directory ./kiauh/kiauh.sh Before that I launched it in the Kiauh directory. Hope that helps.
dw-0 commented 2024-01-27 18:40:31 +01:00 (Migrated from github.com)

Im unable to reproduce the issue on Debian 12 Bookworm and Ubtunu 22.04.3 LTS:
image
image

Im unable to reproduce the issue on Debian 12 Bookworm and Ubtunu 22.04.3 LTS: ![image](https://github.com/dw-0/kiauh/assets/31533186/78488640-0eaa-4fff-a83f-55ed42d9575a) ![image](https://github.com/dw-0/kiauh/assets/31533186/3358cd87-561a-4028-8c2b-92ad569428c5)
dw-0 commented 2024-01-27 18:43:29 +01:00 (Migrated from github.com)

I found a solution that works for me. You need to start the script from your home directory ./kiauh/kiauh.sh Before that I launched it in the Kiauh directory. Hope that helps.

That shouldn't make a difference.
kiauh/kiauh.sh does work as well as cd kiauh and then running ./kiauh.sh

> I found a solution that works for me. You need to start the script from your home directory ./kiauh/kiauh.sh Before that I launched it in the Kiauh directory. Hope that helps. That shouldn't make a difference. `kiauh/kiauh.sh` does work as well as `cd kiauh` and then running `./kiauh.sh`
itsj commented 2024-01-27 18:48:21 +01:00 (Migrated from github.com)

Ahh. I try to start it with sh kiauh.sh
With ./kiauh.sh in /kiauh/ it works as well.
So, my fault. Thank you!

Ahh. I try to start it with `sh kiauh.sh` With `./kiauh.sh ` in `/kiauh/` it works as well. So, my fault. Thank you!
dw-0 commented 2024-01-27 18:52:43 +01:00 (Migrated from github.com)

How to reproduce

sh ./kiauh/kiauh.sh

@catroc why do you execute it with sh instead of bash? That's your issue...

> ### How to reproduce > `sh ./kiauh/kiauh.sh` @catroc why do you execute it with sh instead of bash? That's your issue...
itsj commented 2024-01-27 18:55:41 +01:00 (Migrated from github.com)

It could be that @catroc tried following the same instructions as me.

It could be that @catroc tried following the same instructions as me.
dw-0 commented 2024-01-27 19:01:50 +01:00 (Migrated from github.com)

Where do those instructions come from? @itsj

Where do those instructions come from? @itsj
pardovot commented 2024-01-27 19:28:49 +01:00 (Migrated from github.com)

I probably did the same mistake, didn't came from any instructions, just the power of habit.

I probably did the same mistake, didn't came from any instructions, just the power of habit.
itsj commented 2024-01-27 19:37:12 +01:00 (Migrated from github.com)

Sorry, I can't retrace that anymore, too many videos. A German YouTuber.

Sorry, I can't retrace that anymore, too many videos. A German YouTuber.
dw-0 commented 2024-01-27 19:40:47 +01:00 (Migrated from github.com)

Okay, no problem. I think we can close this issue then. It seems that everything boils down to executing the script in an incorrect way :)

Okay, no problem. I think we can close this issue then. It seems that everything boils down to executing the script in an incorrect way :)
itsj commented 2024-01-27 19:42:00 +01:00 (Migrated from github.com)

Your right, now it works like a charm!

Your right, now it works like a charm!
Sign in to join this conversation.