[CS-FSLUG] Shell Scripting - one liners

Josiah Ritchie jritchie at bible.edu
Fri Jul 30 14:40:00 CDT 2004


> Can you do arithmetic in a shell one-liner?  or something like x = (a < b) 
> ? 1 : 0;  You'll need thes kind of operators to solve the calendar puzzle I 
> had in mind - more details of which have come back to me since I mentioned 
> it.  If a language could be agreed on, I'll submit it for consideration - 
> but unlike usual QOTW, top honours goes to the submission with least number 
> of characters.

I'm pretty sure you can using 'expr'. See:
http://www.freeos.com/guides/lsst/ch02sec07.html

(There I go giving away the answer before the question is here.) :-)

JSR/





More information about the Christiansource mailing list