Talk: How to have PERL script execute automagically for random .sig
From Eric Agnew <agn...@cae.wisc.edu>
· alt.ascii-art
· 27 Apr 1995 00:00 · View full thread
· report
Lawrence Lim <fba...@leonis.nus.sg> wrote: >On 22 Apr 1995, Bob Allison forwarded: >> You execute the script by simply typing in its name in your shell, i.e.: >> sigscript >Pardon me... But I've no knowledge of C lang ... So these Unix cmds will not >make too much sense to me... It's not in C. It's a Perl script. There's no compiling it or anything. Just save it as a file and make sure it's executable. This can be done by typing: chmod u+x sigscript at your shell prompt. The shell prompt is what's there when you're not running tin or pine or something... :) It usually displays the terminal number followed by a % or $, depending on the shell type. Mine says "hp-100% ". Think of it as the equivalent of a DOS prompt... :) > That's it. If you want to see the changes made automagically on every post, >> then add the following line to your .login file: >> setenv NEWSPOSTER '~/sigs/sigscript\;Pnews -h %h' >What does the Pnews mean??... For my newsgrps I use somethin called >tin... So what are the neccessary amendments??... It's the same. Pnews is the actual program called by tin (or trn, which I use, or pretty much any other newsreader) that injects the article into the news stream. I guess you can think of your newsreader as a program that manipulates other programs: it loads articles, displays them (usually using the "more" cmd) and allows you to reply, using whatever editor you choose (i.e. vi, emacs...) and then using the posting program (Pnews). >Also when I tried doin a `sh' on the file there's an error on the line >with srand... Says somethin bout unexpected... Perl gives no err.. but >then the random feature is still not invoked... 8PP... Hmmm... Are you just typing the name of the script? As in "sigscript" by itself? It should work, then, since the first couple lines (with the perl path in it) tell it what to run it from (perl)... Try "cat .signature", then run the script, then cat your .sig again and see if it's different- it should be... <shrug> >Oh BTW... Does this work in pine (ie email??)... Just asked... If I can >sort out the mess for tin... I might work on pine as well... It should... I don't know the env to set for it to work automagically, like the setenv NEWSPOSTER line, but I'm sure there is one somewhere... <?> Hmm. You could always execute the randomizer from within Pine by doing a shell escape- just type "!sigscript" (if you're in a different directory, you might have to supply the path, too, i.e. "!~/sigs/sigscript"). The ! is the shell-escape command, so it'll run whatever you type after it as if you were in your shell instead of in Pine... You can do this from anywhere else, too, like tin... About the only other thing I can think of is you have to set your Pine options to have it include your signature. Or you could do it manually (insert it with your editor). Anything else? :> L8er... -Eric (not realizing he'd be giving out UNIX advice already...) :> -- URL- http://www.engr.wisc.edu/~agnew (/sp.html) | Smashing Pumpkins FAQ mtnr. "Reoccuring living bad dreams, at the vortex of lost souls, wailing lost souls of shame..." -SP, Spaced
Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd588,8303dd7d2b170534 X-Google-Attributes: gidfd588,public X-Google-Thread: fbb9d,8303dd7d2b170534 X-Google-Attributes: gidfbb9d,public X-Google-Thread: f996b,8303dd7d2b170534 X-Google-Attributes: gidf996b,public X-Google-Thread: 110f55,8303dd7d2b170534 X-Google-Attributes: gid110f55,public From: agn...@cae.wisc.edu (Eric Agnew) Subject: Talk: How to have PERL script execute automagically for random .sig Date: 1995/04/27 Message-ID: <3npir8$ir...@gagme.wwa.com>#1/1 X-Deja-AN: 101578197 approved: bob...@wwa.com sender: bob...@gagme.wwa.com references: <3n301h$oh...@gagme.wwa.com> <3nbfcp$gf...@gagme.wwa.com> <3neshg$1c...@gagme.wwa.com> <3noh6o$1t...@gagme.wwa.com> organization: University of Wisconsin - College of Engineering newsgroups: alt.ascii-art.animation,rec.arts.ascii,alt.ascii-art,alt.binaries.pictures.ascii
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this message.
This message was posted publicly to the newsgroup
alt.ascii-art
in 1995 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked.
The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can.
Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.
Report this message
Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.