Command not found error
Hi,
i'm attempting to run the following script but i've been presented with errors i'm not familiar with. can some please point out whats wrong, thanks! script: Code:
#!/bin/bash error: Code:
=Sep: command not found |
You need to get rid of the dollar signs in the assignment statements. You only use $ when you want to get a variable's value. You might also consider replacing the backticks with $(). For example,
Code:
$MYDATE=`date "+%b %d %T"` Code:
MYDATE=$(date "+%b %d %T") |
See here for why $(..) is highly recommended over `..`
By the way, basename can be replaced with a built-in parameter expansion. Code:
MYSCRIPT="${0##*/}" |
All times are GMT -5. The time now is 02:59 AM. |