Shell scripting problems

Sebastian Palm winchester at telia.com
Sun Sep 16 09:54:15 PDT 2001


Hi again.


I'm havin some trouble using tar from within a shell script, and 
I can't figure out what I'm doing wrong. Take a look at this:

First, I issue an echo command

# echo "tar -xvjf cvs/bash*.tar.bz2" > test

I make the "test" file executable, and try it

# ./test

This works just fine. Time to refine it a bit.

cd $LFS/usr/src
tar -xvjf cvs/bash*.tar.bz2

This does not work, tar cannot find the file "cvs/bash*.tar.bz2",
although $LFS = /mnt/lfs, and there is a /mnt/lfs/usr/src/cvs 
directory, containing a file "bash-2.05.tar.bz2". WTF, over?

Next question:

I want to create a script that runs all numbered scripts in a 
directory with a couple of options, but I find the example I have
(/etc/init.d/rc) is kind of out of my league - I can't figure out 
which parts do exactly what.

Ultimately, if I can get it to work, it's going to look a bit like 
this:

/usr/src/
  lfs-20010914/
    source/
      (the lfs source packages)
    scripts/
      (all the lfs setup scripts)
    install/
      (Alphanumeric symlinks to ../scripts, frex S005bash, D045bash)
    options/
      (sources and scripts for optional components, like X11 and KDE,
      in subdirectories, as well as an install dir with the same purpose 
      as the main one)
    setup.sh
      (main installation script, runs all the others)

Does anyone want to help?

Sebastian


-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-apps' in the subject header of the message



More information about the blfs-support mailing list