pure bash, grep, sed??? best solution?

Björn Lindberg d95-bli at nada.kth.se
Fri Sep 6 07:00:29 PDT 2002


Björn Lindberg wrote:
> 
> DJ Lucas wrote:
> 
> > # source the newly created file
> > source /var/cache/rltmp
> > if [ "$RLTEST" == "N 3" ]
> > then
> >     echo 'PRL=N' >> /var/cache/rlstate
> >     echo 'CRL=3' >> /var/cache/rlstate
> > fi
> 
>         echo $RLTEST | read PRL CRL

Perhaps I should clarify. Then when you have the runlevels in 2
variables, you can do

	echo "PRL=$PRL" >> /var/cache/rlstate
	echo "CRL=$CRL" >> /var/cache/rlstate

The variables will be expanded in place, so no that if-clauses are
necessary.


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



More information about the lfs-chat mailing list