[ale] Bash question

Danny Cox danscox at mindspring.com
Thu Sep 5 10:11:59 EDT 2002


Andrew,

On Thu, 2002-09-05 at 10:01, Andrew Grimmke wrote:
> How about this, or am I on the wrong track?
> 
>   cut -d'=*' -f$RANDOM

	Well, yeah, if you want to do it all at once! ;-)  I thought the main
idea was to learn bash stuff!

	Besides, if the file is 100 jokes long, and $RANDOM returns anything
greater than 100, you get nothing.  You'll still have to do a modulo
divide in there.

	Also, I just checked, the -d option to cut only uses the FIRST char in
the string you give it.

	Close, though.

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list