Difference between revisions of "User:Minooz/RepoSyncProj/Bash"
< User:Minooz | RepoSyncProj
(→Bash Scripting Help) |
(→Tips) |
||
Line 12: | Line 12: | ||
rm -r $tmExternal >> $dateError.txt | rm -r $tmExternal >> $dateError.txt | ||
fi | fi | ||
+ | </source> | ||
+ | |||
+ | |||
+ | * The increment operator in bash | ||
+ | <source lang=bash> | ||
+ | |||
+ | while [ $revTmpInternal -lt $revInternal ]; do | ||
+ | ((revTmpInternal++)) | ||
+ | done | ||
</source> | </source> |
Revision as of 10:46, 18 October 2010
Bash Scripting Help
Tips
- Watch the spaces
if [ -d "$tmpInternal" ]; then
rm -r $tmpInternal >> $dateError.txt
elif [ -d "$tmpExternal" ]; then
rm -r $tmExternal >> $dateError.txt
fi
- The increment operator in bash
while [ $revTmpInternal -lt $revInternal ]; do
((revTmpInternal++))
done