Mark Sapiro writes:
 > Stephen J. Turnbull wrote:
 > 
 > >Con Wieland writes:
 > >
 > > > for p in   ; \
 > >
 > >This is the problem.  There is a variable that should contain a list,
 > >and it's empty.  I think you can probably get past this by wrapping
 > >the variable in "" (not ''), but I don't know if that is TRT.
 > 
 > 
 > It won't get very far past it. The commands in the for loop will fail
 > because of the blank value of $p.

At least some minimal POSIX shells (dash, I think) treat a missing
argument as a syntax error, but a zero-length string as a null list
(and so DTRT of executing zero times).  It sorta makes sense...

It's amazing how often simply wrapping all variable references in ""
solves shell script errors.
------------------------------------------------------
Mailman-Users mailing list [email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to