Hello all.
With help on forum i've got the ideia of making the script to check if the file was created today and if its so,print its name.
Here it is:
#!/bin/bash
for file in *; do
filedate= "date -r $file +%Y-%m-%d"
currentdate= "date +%Y-%m-%d"
if["$filedate" == "$currentdate"]; then
echo $file
fi
done
After reading some tuts, it appers to be parcially valid, but i get the next errors :
./script.sh: line 6: syntax error near unexpected token `then'
./script.sh: line 6: ` if["$filedate" == "$currentdate"]; then'
Thanks in advance.