Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005

    Writing a Bash Script to Install Programs

    It would be nice if I could write a script to install multiple programs. What I have in mind is actually a simple Bash script to automate LFS installation. I may have typed in a command wrongly, so it would be good if I could save all of the output in some file. I would also like the commands to be printed in that file so I can know which command led to what output. Any short code snippets to help me to do that?

  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003

    Thats basically what you'll want to do, sans the CVS part. Add an echo before each command and then redirect the output to a file and bam. I'm not sure how you want to list the programs to be installed, so without that I couldn't tell you how to modify it any further.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Look into tee for login stdout from scripts, also have a look at ALFS this is a bunch of make files IIRC to automate building an LFS system might be a good place to start? The other alternative is to write a bash script for each program and have a script run each of them, this is long winded and done already by the ALFS people.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts