Hey , I'm new to Bash and am having trouble with writing a script.
I have a variable and want to use it to create a tar file, but, I am having problems. Can anyone tell me what I'm doing wrong?
filestr=`date "+%y-%m-%d %H.%M.%S"`.tar
tar -cvf $filestr test.txt
So, basically, I'm creating a tar file based on the datetime in a specific format, but, the problem is that there is a space in the file name, so, the script fails during the tar creation.