Difference between revisions of "User:Minooz/RepoSyncProj/Bash"
< User:Minooz | RepoSyncProj
(→Bash Scripting Help) |
(→Bash Scripting Help) |
||
Line 3: | Line 3: | ||
:[http://arachnoid.com/linux/shell_programming.html Shell Programming] | :[http://arachnoid.com/linux/shell_programming.html Shell Programming] | ||
: [http://www.linux.org/lessons/advanced/x1110.html Linux org] | : [http://www.linux.org/lessons/advanced/x1110.html Linux org] | ||
+ | ==Tips== | ||
+ | *Watch the spaces | ||
+ | <source lang=bash> | ||
+ | |||
+ | if [ -d "$tmpInternal" ]; then | ||
+ | rm -r $tmpInternal >> $dateError.txt | ||
+ | elif [ -d "$tmpExternal" ]; then | ||
+ | rm -r $tmExternal >> $dateError.txt | ||
+ | fi | ||
+ | </source> |
Revision as of 10:11, 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