ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am trying to get a script to run during boot up. I need this script to run an executable that does a lights out firmware upgrade on a DL360. In itself this isnt a problem. I have built a boot disk and I can get it to run scripts. However my Bash scripting isnt too hot.
The problem is, when the binary runs it prompts me for a yes or no. I need the script that execs the binary to give it a 'y'
something like ?
./firmware.bin < echo 'y'
Please help. Ive spent ages getting this far, and now its getting silly.
Thankyou very much for the answers, Unfortunatly I have other problems as I had to reduse the size of Libraries and the script wont run at all at the moment. I get an error saying the ash shell cant find the executable, which isnt true. The shell cant find something that the executable is calling. Oh well.
I will try the answers when I get around this one.
This is not using yum to install a rpm, but rather a binary executable that appears to update the (iLo) lights out firmware on a DL360 and configures the iLo based on a XML configuration file.
So I can kick it off with ./ or the full path name. I placed it in /bin.
echo "Ugrading the firmware to version 1.88"
This definately works fromn the command line but Im there to answer 'y' to the prompt.
Thank you very much for the replies. Any other suggestions I can try would be appreciated.
I will come back to let everyone know how I get on.
never head of CONFIRM.....good stuff.... I will use it
As ygloo stated, but didn't really elaborate on, any string can be used instead of CONFIRM. I usually use EOF myself, or something a bit more descriptive if I am using multiple here documents in the same script.
Basically what a here document is, is a set of commands or responses that get passed to a command. For example, you can ...
$ vi some_file <<EOF
Which would do a global search and replace in the some_file using vi.
NOTE that if you were to use '<< EOF', then you must have a space in front of the terminating EOF as well. It has tripped me up a few times.