I'm trying to learn how to use
bash scripts; I have googled answers but can not find any answer to my problem.
The script looks like this:
#!/bin/bash TIME=`date +%b-%d-%y` FILENAME=backup-$TIME.tar.gz DESDIR=home/pi/backups SRC=home/pi/backuplist.txt find -iname '*.orig' -o -iname '*.py' > home/pi/backuplist.txt tar -zcvf $DESDIR/$FILENAME $SRC
when I run this it doesn't create the
backuplist.txt so there is no result to use with
i tried using
find -iname directly with
tar in a pipeline but just got the response
-iname command does not exist.
When I use
find to output first in the terminal and then use
tar it works.
What am I doing wrong?