View Single Post
  #2   Report Post  
Old December 28th 20, 08:58 AM
jerry_maguire jerry_maguire is offline
Junior Member
 
First recorded activity by ExcelBanter: Dec 2020
Posts: 26
Default Try this

Run the script either as:

bash script.sh
or just:

./script.sh
When bash is run using the name sh, it disables most of its extensions, such as the [[ testing operator.

Since you have the #!/bin/bash shebang line, you don't need to specify the shell interpreter explicitly on the command line. Running the script as a command will use that line to find the shell.

Let me know if this was helpful.

Regards,
Jerry