[BL] Simple File Manager (was: DOS & Shell Scripting Guide)

3aoo-cvfd at dea.spamcon.org 3aoo-cvfd at dea.spamcon.org
Sat Feb 3 01:16:27 EST 2007


> It now supresses output (unless the p parameter
> is used).  So the script should look like this:
> --------------------------------------------------
> clear
> num=1
> set  "/" "/bin" "/dev" "/etc" "/home" "/lib" "/proc" "/root" "/sbin" "/usr" "/var" ".." `/bin/ls -F`
> for file in "$@" ; do
> busybox.bl3 printf "%-20s" "[${num}] $file"
> [ `dc $num 4 mod p` = 0 ] && echo
> num=`expr $num + 1`
> done
> -------------------------------------------------

Oops, I left in busybox.bl3 (used for testing).  
The last 5 lines should actually look like this:
---------------------------------
for file in "$@" ; do
printf "%-20s" "[${num}] $file"
[ `dc $num 4 mod p` = 0 ] && echo
num=`expr $num + 1`
done
---------------------------------

Cheers,
Steven



More information about the BasLinux mailing list