i have the script below which is not working .. i could not manage to find the mistakes in it, can anyone help please.
service httpd stop
if [ -d "$HomeLogsPath" ]; then
mkdir -p "$LogsBackupDir"
mv * $LogsBackupDir
service httpd start
./restart.sh: line 4: =~/dir1/test/: No such file or directory
./restart.sh: line 5: =~/dir1/backup/20160506/: No such file or directory
$ should only be used when substituting variables, not when assigning them.