Open main menu

CDOT Wiki β

Changes

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>
fileserrors=$(ls Error*.txt 2> /tmpdev/*.cachenull | wc -l)if [ "$files errors" != "0" ]; thenecho "Cache files exist: do something with them"elseecho "No cache files.. rm Error*."txt
fi
</source>
:Also this solution @ http://kenfallon.com/?p=4
1
edit