how to proceed with chapter 7 concerning cat > output << EOF

Matthias Benkmann mbenkmann at gmx.de
Thu Nov 2 13:03:45 PST 2000


> On November  2, 2000 11:47 am, you wrote:
> > Maybe you could instruct the cat users to issue a
> > command like :
> >
> > FAILURE='$FAILURE'
> >
> > (in the example you cited), before going on
> > with the "cat > rc << EOF ..."
> 
> If it's just variables that were bothering me that would have been a good 
> solution
> 
> But look at this:
> 
> #begin
> some junk here
> 	kill -9 `cat /var/run/$1.pid`
> #end
> 
> in that cat > out << eof the `cat /var/run/$1.pid` results in bash running 
> cat /var/run/$1.pid and you can't declare a variable to get around that 
> problem. Got a solution for that too?

Why not use good ol' echo instead of cat? How about

echo '
some junk here
kill -9 `cat /var/run/$1.pid`
' >script

MSB

----
A psychologist is a man who watches everyone else when a beautiful
girl enters the room.


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




More information about the lfs-dev mailing list