[ale] shell scripting baby questions...

David S. Jackson deepbsd at earthlink.net
Fri Feb 27 21:55:20 EST 2004


On Fri, Feb 27, 2004 at 01:10:51PM -0500 Geoffrey The Esoteric <esoteric at 3times25.net> wrote:
> David S. Jackson wrote:
> 
> >># file and path variables
> >>reportTime=`date +%y%m%d_%H%M%S`;
> >>logName="scan_$reportTime.log";
> >>infectedLogName="infected_$reportTime.log";
> >>logPath="/home/samba/production/vlogs";
> >>dirToScan="/home/samba/production";
> >
> >
> >Just FYI, you don't really need the ';' at the end of each line like
> >you do in perl.  I don't think it does any harm, except that it might
> >confuse you or someone else looking over your source.  You might
> >start putting spaces in variable assignments like: blah = "whatever";
> >as you would in perl!  :-)
> 
> I believe that only works if you use the:
> 
> set foo = "bar"
> 
> syntax.  At least on my box:
> 
> foo = "bar"
> 
> yields:
> 
> bash: /home/esoteric/shl/foo: Permission denied

I meant that confusing perl-like syntax (';' at end of statements)
with bash might make you accidentally use perl syntax (variable
assignments with spaces) in your bash scripts.  Sorry, should have
been clearer.  

-- 
David S. Jackson                                dsj at dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Home of Doberman Propulsion Laboratories: The ultimate in
watchdog weaponry.
		-- Chris Shaw



More information about the Ale mailing list