On Sat, 2008-08-23 at 23:05 +0200, Lukas Beeler wrote:
[snip]
Well, the shell is also programmable. Shell scripts are very similar
to CL, except less readable.

The languages are so different at to make comparison difficult, but for
lots of purposes, I agree that the extra verbosity of CL is a big help.

On the other hand, the shell provides sometimes-useful features like
word-splitting, regular expression tests, globbing, and so forth.

Variable assignment in shell is foo='bar' (standard quoting rules
apply - you can use ", ' or no quoting, depending on the string).

Remember however, that the kind of quoting matters. For example (but
beware, because I am retyping this instead of copying and pasting) ...
> c="one two"
> for x in $c; do echo $x; done
one
two
> for x in "$c"; do echo $x; done
one two
> for x in '$c'; do echo $x; done
$c

Cheers,
Terry.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.