> 
> > The following example is taken from the xinitrc file: 
> >  
> > <quote begins> 
> >  
> > if [ -f $sysresources ]; then 
> >      xrdb -merge $sysresources 
> >  
> > fi 
> > <quote ends> 
> >  
> > Is the "fi" a token? 
> > How can I find out what "fi" does? 
> 
> "fi" marks the end of the if statement (fi is if backwards)

Quite right.  You can find this information as well as more in shell
programming with the "man bash" command.

> > In the expression " -f $sysresources ", is bash looking for "$sysresources" in the 
>  
> > enviroment? 
> > What does the "-f" signify? 
> 
> I'm not an shell programming expert, but often -f is used to check if
> a file exists.  It may not be used in that manner here and I'm certain
> someone will correct me if I'm wrong.

Right again.  This is a little harder to find, but the "[]" are really
shorthand for the "test" command.  So, you can "man test" for more info on how
this works.

I don't mean to sound like I'm saying RTFM, but I know when I was a newbie, it
was very informative to not only know the answer, but know how to find it on
my own.  After doing so for a few weeks and perusing above and beyond many
times, I was learning more and more on my own.

-Michael

-- 
"They that can give up essential liberty to obtain a little temporary
 safety deserve neither liberty nor safety."
                -- Benjamin Franklin, 1759


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to