[ale] Shell scripting with bash
Ken Nagorski
kenn at pcintelligent.com
Wed Apr 18 19:43:04 EDT 2001
Hi there,
I have a little problem using bash. I usually use bash for real
simple stuff no more than 3-4 lines of code however I have a script that
lends itself to bash. It's for making boot disks that use lilo. It works
fine except for the part where I call a function.
The code is below however, this is what I wanna do. I want to set
it up so that the user enters the kernel they want on the boot disk. If
that doesn't exsist - ask agian. I seem to be having a bit of a problem
making use of functions in bash....
get_kern
{
echo "Please enter the full path of the kernel you wish to use"
read kernel
}
if [ -e $kernel ]
then
cp $kernel /mnt/floppy/vmlinuz
lilo -v -C /mnt/floppy/lilo.conf -f /mnt/floppy
exit 0
else
get_kern
fi
It works the first time I call it from the program but then it
complains if I try to call it agian. Any suggestions. I looked at the bash
programing howto and I couldn't find anything about calling functios cept
the simple little example. I also checked the web. Nothing helped there
either.
Thank you
Ken
--
I couldn't quite remember what I was going to say
so I causally tip another sip of whatever it was I was drinking,
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list