Hi Guys,
I installed the editor nano on my FreeBSD. Now I want to use this in a script. For this I install nano and would like to check if it can be found under
However, he always jumps directly into the else branch. I suspect that here the "-f" query does not work, because it is not directly a file, right?
Thank you for help
I installed the editor nano on my FreeBSD. Now I want to use this in a script. For this I install nano and would like to check if it can be found under
/usr/locale/bin/nano
. If this can be found there, I would like to define the Tabspace. Have to date the following script:
Bash:
#!/bin/bash
if [ -f "/usr/locale/bin/nano" ]; then
setenv EDITOR /usr/locale/bin/nano
echo "set tabsize 4
set tabstospaces" >> ~/.nanorc
else
echo "Nope"
exit 1
fi
However, he always jumps directly into the else branch. I suspect that here the "-f" query does not work, because it is not directly a file, right?
Thank you for help