Reputation: 5
I'm trying to execute a string (actually it's a part of a longer string that I split into different strings.
my error message is tr1.sh: 3: tr1.sh: Bad substitution
#!/bin/bash
if [ ! -d ${HOME }/ trashbin ]
then mkdir ${HOME }/ trashbin
fi
Upvotes: 0
Views: 68
Reputation:
Remove the spaces:
#!/bin/bash
if [ ! -d ${HOME}/trashbin ]
then mkdir ${HOME}/trashbin
fi
Upvotes: 4