[plug] script

David Campbell campbell at torque.net
Fri Oct 2 13:24:50 WST 1998


From:           	"Shackleton, Kevin" <kshackleton at agric.wa.gov.au>
To:             	plug at linux.org.au
Subject:        	[plug] script
Date sent:      	Fri, 2 Oct 1998 13:22:24 +0800
Send reply to:  	plug at linux.org.au

> I have just written this script
> 
> umount /mnt/cdrom
> eject
> echo Change CD, press Enter to continue . .
> read
> mount /mnt/cdrom
> 
> After discovering I had to chmod it to make it executable, I was able to
> run it.  However it does not echo the prompt.  Why is that?  Does this
> script not take over the console while it runs?

Firstly try:
======================================
echo "Change CD, press Enter to continue..."
======================================

Secondly please place the script program in the first line, eg:
======================================
#!/bin/sh
======================================
This is to ensure that the script is run using bash (/bin/sh under linux is 
bash). Not all shell scripts are equal, then again not everyone uses perl as 
their login shell (although I know someone who I suspect does!)

David Campbell
=======================================================
campbell at torque.net

Current project list:
a) Maintain Linux ZIP drivers
b) Create Linux chipset specific parport drivers
c) Start on ParSCSI drivers
d) Boot proms for parport devices (socket onto NE2000 cards)

Any assistance to clearing this list most welcome


More information about the plug mailing list