Bash current folder
Sometimes, if you run some bash scripts from cronjob or with the absolute path you will receive an error like this: Can’t open perl script “backup.cgi”. No such file or directory. To solve this, you must make sure you set bash to read from the directory where it is located: cd $(dirname $0) This will… Read More »