Revision [1506]

Last edited on 2010-07-15 09:09:39 by KlenwellAdmin
Additions:
====Code====
%%(bash)
#!/bin/bash
# note: the first path will not be expanded below
PATH_LIST="~/tmp
/home/klenwell/tmp"
function loop_list() {
for i in /tmp /tmp/asdfghjk456
do
if [[ -e $i ]]; then
echo "path $i exists"
else
echo "path $i does not exist"
fi
done

for p in $PATH_LIST
do
if [[ -e "$p" ]]; then
echo "path $p exists"
else
echo "path $p does not exist"
fi
done
}
#
# Main
#
loop_list
%%


Revision [1505]

The oldest known version of this page was created on 2010-07-15 09:06:42 by KlenwellAdmin
Valid XHTML 1.0 TransitionalValid CSSWikkaWiki