From 9f0936309b1b21811fc3e01039d09fcc34cabbfe Mon Sep 17 00:00:00 2001 From: Andreas Grub Date: Wed, 16 Feb 2022 07:38:03 +0100 Subject: [PATCH] Explicitly use bash to fix "bad substitution" error When I run the `nsenter-node.sh` script without this change, I get the following error: ``` /home/agr/.bin/nsenter-node.sh: 9: Bad substitution ``` I think that's because `/bin/sh` is not bash on my system. So let's explicitly declare in the shebang that we use bash. Also use the recommended `/usr/bin/env` to find the path to bash. --- nsenter-node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nsenter-node.sh b/nsenter-node.sh index 7507224..101946a 100755 --- a/nsenter-node.sh +++ b/nsenter-node.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash set -x node=${1}