Skip to Content.
Sympa Menu

baslinux - Re: [BL] Scripts with BL3

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] Scripts with BL3
  • Date: Sun, 11 Dec 2005 11:48:30 +1300

Ian wrote:
>
> I need to learn a bit of scripting for BL3. Could
> someone please start me off. Im fairly ok with Dos
> batch files.

There are some similarities, but (b)ash scripting
is more structured and doesn't do DOS-type branching.
You will find a lot of example scripts in BasicLinux.
The most complex one is: /usr/games/castle

> @echo off
> if exist a:\null goto UNMOUNT
> mount -t msdos /dev/fd0 /mnt/floppy
> goto END
> :UNMOUNT
> umount /dev/fd0
> :END

------------------------------------------
if grep -q /dev/fd0 /etc/mtab
then umount /dev/fd0
else mount -t msdos /dev/fd0 /mnt/floppy
fi
------------------------------------------

Cheers,
Steven

____________________________
http://www.basiclinux.com.ru





Archive powered by MHonArc 2.6.24.

Top of Page