Trying to run .sh file. with --password "~/RPI.filename"
in it. Should read the filename
but getting an error. Even though the file exists
error:
Fatal: Failed to read password file: open ~/RPI/filename.sec: no such file or directory
list of directories and files:
~/RPI$ l
g.json m1/ m2/ filename.sec startm1.sh*
I have used it before and I know the method works but no idea what on earth is happening here.
2
Answers
Maybe your script is running in sh instead of bash ? I think "~" is bash syntax.
There are 1½ issues here…
First, quoting a tilde prevents tilde expansion; compare
ls ~/RPI.filename
andls "~/RPI.filename"
=> leave the tilde unquoted if you don’t want a literal ‘~’
Second, is it
~/RPI.filename
or~/RPI/filename
?