I can't realize why if I just try to concat some file paths (without opening the files), I get "permission denied":
#!/bin/bash
if [ "$#" -eq 1 ]; then
path1= "./src/$1"
path2= "./Main/$1"
echo $path1
else
echo "Invalid number of parameters"
fi
This is how I execute the bash script (named compare.sh):
PS: ./src/GraphicTest.cpp
and ./Main/GraphicTest.cpp
are existing files.
=
.