Skip to Content.
Sympa Menu

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

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: 3aoo-cvfd AT dea.spamcon.org
  • To: BasicLinux List <baslinux AT lists.ibiblio.org>
  • Subject: Re: [BL] Simple File Manager (was: DOS & Shell Scripting Guide)
  • Date: Sat, 03 Feb 2007 18:43:13 +1300

> > clear
> > num=1
> > set "/" "/bin" "/dev" "/etc" "/home" "/lib" "/proc" "/root" "/sbin"
> > "/usr" "/var" ".." `/bin/ls -F`
> > for file in "$@" ; do
> > printf "%-20s" "[${num}] $file"
> > [ `dc $num 4 mod` = 0 ] && echo
> > num=`expr $num + 1`
> > done
>
> [11] /var [: 0: unknown operand
>
> It turns out to be a bug in the dc in BL3 busybox.

You can get the script to work on BL3, by replacing the
dc line with this:
------------------------------------------------------------
case $num in 4|8|12|16|20|24|28|32|36|40|44|48|52|56|60)echo
esac
------------------------------------------------------------

It's not very elegant, but at least it works on BL3.

Cheers,
Steven




Archive powered by MHonArc 2.6.24.

Top of Page