[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash script question (was: Re: Netscape 4.73 wrapper broken)



On Fri, Jun 23, 2000 at 08:51:44PM -0400, Peter Kovacs wrote
> On Sat, 24 Jun 2000, Mark Phillips wrote:
> 
> > What does "YMMV" stand for?
> 
> YMMV = Your Mileage May Vary
> 
> > An official fix has come through, and what it does is replace
> > 
> > 	for f in (cd.....
> > 
> > by
> > 
> > 	for f in $(cd....
> 
> From man 1 bash:
>    Command Substitution
>        Command substitution allows the output  of  a  command  to
>        replace the command name.  There are two forms:
> 
>               $(command)
>        or
>               `command`
> 
> That's why I had the backticks in there.  I've never seen the
> $() construct either.  
> 
> > And what is the ". $d/$f" supposed to do??
> > 
> 
> Again, from man 1 bash:
>         .  filename [arguments]
>        source filename [arguments]
>               Read and execute commands from filename in the cur­
>               rent  shell  environment and return the exit status
>               of the last command  executed  from  filename...
> 
> It simply executes those files as a shell script.
> 

To be more accurate, it executes the contents of those files
as if they had been included in the current script.  No new 
shell, all the current parameters accessible, any parameters
or functions defined in those files available in the current
context.


John P.
-- 
huiac@camtech.net.au
john@huiac.apana.org.au
http://www.mdt.net.au/~john Debian Linux admin & support:technical services



Reply to: