Hello,

tnx, it seems to work now, at least, the variables are set. 
Well, what I thought was: if you do 'cat $config_file', the config-file is 'shown', so 
I thought that the command 'eval cat $config_file' would result in:

eval server=LABMETSERVER service=HPLaserJ user=kurts passwd=XXXXX

and this would set the variables, no? I still don't understand why this is not ok...
Anyway, the spaces, that was clearly an error. I removed these...

tnx,
Kurt.



Mail from [EMAIL PROTECTED], sent on Friday February 14 2003 at 20:15 (GMT-0500): 

  > On Fri, 14 Feb 2003, Kurt Sys wrote:
  > 
  > >
  > > spool_dir=/var/spool/lpd/smb0
  > > config_file=$spool_dir/.config
  > >
  > > eval cat $config_file
  > 
  > Excuse me?  Why do you think this will set any shell variables?
  > This is just going to copy your config file to stdout.
  > See "help eval" and man cat.
  > 
  > I think you want something like
  > 
  > tn=`mktemp /tmp/x.XXXXXXX` && sed 's/ //g' $cf >$tn && source $tn && rm $tn
  > unset tn
  > 
  > AFAIK, the way to set a shell variable is: "name=value",
  > not "name = value", hence the sed
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to