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: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] Simple File Manager (was: DOS & Shell Scripting Guide)
  • Date: Sat, 03 Feb 2007 19:11:14 +1300

> > > dc $num 4 mod
> > > on the commandline yields _no_ output,
> >
> > It turns out to be a bug in the dc in BL3 busybox.

I was wrong. It's not a bug, it's a feature.
The syntax of dc was changed after busybox 1.01.
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
-------------------------------------------------

Cheers,
Steven




Archive powered by MHonArc 2.6.24.

Top of Page