Open main menu
CDOT Wiki
β
Search
Changes
← Older edit
Newer edit →
User:Minooz/RepoSyncProj/Bash
33 bytes removed
,
09:44, 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>
Minooz
1
edit