I tried a one line script that worked in one Linux based distro(Linux mint) but doesn't work in another(Fedora). I typed the following line in my bash script.
mkdir $HOME/folder123
The error i receive:
bash: create.sh: No such file or directory
I tried creating a folder myself, it gave me a permission denied?
To clear things hopefully: mkdir is in the script create.sh and i run it in the terminal with the command bash create.sh
echo $HOME
show? is that var in the environment of whatever shell you're running this script in?which mkdir
show?\mkdir $HOME/folder123
mkdir
should be a binary and not a script, so it should never call any subscript likecreate.sh
. Perhaps the command is aliased to something else. Alternatively, and please don't get all upset about it, someone might have been messing with your system, making it look likemkdir
is still there, but also does some extra things, perhaps in the hopes that you run it as root