|
|
|
@ -2,8 +2,21 @@ |
|
|
|
|
|
|
|
|
|
. ./io.sh |
|
|
|
|
|
|
|
|
|
filePutContent ./temp.txt "Content was added successfuly1" |
|
|
|
|
filePutContent ./temp.txt "Content was added successfuly2" |
|
|
|
|
filePutContent ./temp.txt "Content was added successfully1" |
|
|
|
|
|
|
|
|
|
[ "$(fileExists ./temp.txt)" ] && echo "File exists" |
|
|
|
|
|
|
|
|
|
filePutContent ./temp.txt "Content was added successfully2" |
|
|
|
|
|
|
|
|
|
cat ./temp.txt |
|
|
|
|
unlink ./temp.txt |
|
|
|
|
unlink ./temp.txt |
|
|
|
|
|
|
|
|
|
[ ! "$(fileExists ./temp.txt)" ] && echo "File not exists" |
|
|
|
|
|
|
|
|
|
today="$(date +%Y-%m-%d)" |
|
|
|
|
nextDate=$(date +%Y-%m-%d -d "$today - 3 days") |
|
|
|
|
|
|
|
|
|
touch -mad "$nextDate 00:00:01" ./temp |
|
|
|
|
[ "$(fileModifiedOlder ./temp 3)" ] && echo "File is older 3 days" |
|
|
|
|
[ ! "$(fileModifiedOlder ./temp 4)" ] && echo "File is not older 4 days" |
|
|
|
|
unlink ./temp |