Open main menu
CDOT Wiki
β
Search
Changes
← Older edit
User:Minooz/RepoSyncProj/Bash
101 bytes added
,
16:27, 19 October 2010
→
Tips
* To check if multiple files exist:
http://www.ducea.com/2009/03/05/bash-tips-if-e-wildcard-file-check-too-many-arguments/
<source lang=bash>
files
errors
=$(ls
Error*.txt 2>
/
tmp
dev
/
*.cache
null | wc -l
)if [
"
$
files
errors" != "0"
]
;
then
echo "Cache files exist: do something with them"
else
echo "No cache files..
rm Error*
.
"
txt
fi
</source>
:Also this solution @ http://kenfallon.com/?p=4
Minooz
1
edit