[ale] Bash question

Geoffrey esoteric at 3times25.net
Thu Sep 5 11:47:05 EDT 2002


ChangingLINKS.com wrote:
> Put email at ChangingLINKS.com on the list please . . . . : ) 

Drew, if you're requesting to add a new email address or change your 
existing subscription info, you can locate info on the 
http://www.ale.org site to accomplish this.

Understand, that it's virtually impossible for any one person to handle 
such manual requests.

> 
> On Thursday 05 September 2002 11:06, Fletch wrote:
> 
>>>>>>>"esoteric" == esoteric  <Geoffrey> writes:
>>>>>>
>>    esoteric> Understanding that this was originally a bash question,
>>    esoteric> I'd suggest Perl is really the proper tool.  I'm just
>>    esoteric> waiting for Fletch to chime in here... :)
>>
>>
>>        Well, if you're going to twist my arm . . .
>>
>>
>>perl -e '$/="=*\n";while(<>){rand($.)<1&&do{chomp;$l=$_}}print$l' data
>>
>>
>>        That presumes that the "=*\n" delimiter follows items (yours
>>basically had it preceding it, so you get an empty first record).
>>It's basically the same format as fortune data files (which use "%\n"
>>instead; see man strfile, man fortune; replacing "=*\n" with "%\n"
>>gives you a poor man's fortune replacement).  As for an explanation
>>what it's doing, see perldoc -q 'random line'.
>>
>>
>>        Not that I in any way condone automatically sending people
>>jokes via email.  Come on, it's not the late 1980s any more. :)
> 
> 


-- 
Until later: Geoffrey		esoteric at 3times25.net

I didn't have to buy my radio from a specific company to listen
to FM, why doesn't that apply to the Internet (anymore...)?


---
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