I've started with the following script: myfilename = $(date +%m%d%y) + ".tar.gz" echo $myfilename It is giving me this error: ./backupfiles.sh: line 1: myfilename: command not found. I know I'm doing something wrong here, just can't figure out what. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 1/16/07, John Meyer
I've started with the following script:
myfilename = $(date +%m%d%y) + ".tar.gz" echo $myfilename
try: myfilename=$(date +%m%d%y)".tar.gz" echo $myfilename # Note : no space before or after the = # Note : no '+' sign Regards Marius -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2007-01-16 at 05:39 -0700, John Meyer wrote:
I've started with the following script:
myfilename = $(date +%m%d%y) + ".tar.gz" echo $myfilename
It is giving me this error: ./backupfiles.sh: line 1: myfilename: command not found. I know I'm doing something wrong here, just can't figure out what.
Extra spaces ;-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFrMoltTMYHG2NR9URArQDAJ90oP6DlaVKXp3DgqTBwbI6znLF/QCglJNN 0Q7EL9+tUTXFIGUSk4ZLO+g= =iUiw -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
John Meyer wrote:
I've started with the following script:
myfilename = $(date +%m%d%y) + ".tar.gz" echo $myfilename
It is giving me this error: ./backupfiles.sh: line 1: myfilename: command not found. I know I'm doing something wrong here, just can't figure out what.
Try TODAY=`date '+%Y%m%d'` myfilename=$TODAY.tar.gz echo $MYFILENAME Ulf Rasch -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Ulf Rasch wrote:
John Meyer wrote:
I've started with the following script:
myfilename = $(date +%m%d%y) + ".tar.gz" echo $myfilename
It is giving me this error: ./backupfiles.sh: line 1: myfilename: command not found. I know I'm doing something wrong here, just can't figure out what.
Try
TODAY=`date '+%Y%m%d'` myfilename=$TODAY.tar.gz
echo $MYFILENAME
dooooh echo $myfilename of course Ulf Rasch -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
John Meyer wrote:
I've started with the following script:
myfilename = $(date +%m%d%y) + ".tar.gz" echo $myfilename
It is giving me this error: ./backupfiles.sh: line 1: myfilename: command not found. I know I'm doing something wrong here, just can't figure out what.
Well it's giving you that error because you have a space after myfilename. But if you fix that error, it'll give you some more :( I'd suggest typing "bash tutorial" into the form at http://www.google.com/linux Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Carlos E. R.
-
Dave Howorth
-
John Meyer
-
Marius Roets
-
Ulf Rasch