Original Usenet thread from alt.ascii-art, started 9 Nov 1996.
REQ: .sig changer for UNIX
alt.ascii-art
· 4 messages · 9 Nov 1996 - 12 Nov 1996
Hi All! I'm looking for hints on how to make a .sig changer script for UNIX. I'm working in C and Korn shells, so a script working under either shell can work. Basicly, I'd like the script to change my script every time I log in (Or even better, randomly change every time I post an article/email a message). I haven't found any FAQ's on this... I know this sounds like a job for PERL, and I actually do have the 'sigrandom' PERL program, but I know very little of the language (But I'm learning), and cannot figure out how to get it to work on my system. So, does anyone have any hints suggestions on making a script. Here's the only version I can get to work... any hints or suggegstions would be appreciated. cp $HOME/.sig/sig8 $HOME/.signature cp $HOME/.sig/sig7 $HOME/.sig/sig8 cp $HOME/.sig/sig6 $HOME/.sig/sig7 cp $HOME/.sig/sig5 $HOME/.sig/sig6 cp $HOME/.sig/sig4 $HOME/.sig/sig5 cp $HOME/.sig/sig3 $HOME/.sig/sig4 cp $HOME/.sig/sig2 $HOME/.sig/sig3 cp $HOME/.sig/sig1 $HOME/.sig/sig2 cp $HOME/.signature $HOME/.sig/sig1 Rudementary, but it works. Basically... I have 8 files named sig1-sig8 in a directory named .sig. I want a different file to be copied as $HOME/.signature every time I log in. |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| | Stefan Lasiewski >>>CONTENTS UNDER PRESSURE<<< | | gan...@rahul.net >>>DO NOT PUNCTURE<<< | | http://www.rahul.net/gangrel | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| | Stefan Lasiewski >>>CONTENTS UNDER PRESSURE<<< | | gan...@rahul.net >>>DO NOT PUNCTURE<<< | | http://www.rahul.net/gangrel |
Hi all, I saved this site a year ago so I have no idea if it is still
there:
http://ironbark.bendigo.latrobe.edu.au/ugrad/sigger.html random .sig
Cheers, Jon Melusky
~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
<a href="http://weber.u.washington.edu/~whatfer/jonjen.html> Our page.
</a> _ _ __ __ Wagner Codes:
_| \_) |_ (_/ _| a+--f--e--d-b++g+w+v
(_ _ _) _ (_ Puzzle
|_( )_|__( >__| By Jon and Randy R.
|_ _| |_ http://www.geocities.com/SoHo/7889
_) |_ _(
/_ _|_ ___ | Windows 95, Micron 133mhz, Seattle USA
(_< (_) ^
Stefan Alexei Lasiewski (gan...@rahul.net) wrote:
: Hi All!
: I'm looking for hints on how to make a .sig changer script for UNIX. I'm
: working in C and Korn shells, so a script working under either shell can
: work. Basicly, I'd like the script to change my script every time I log in
: (Or even better, randomly change every time I post an article/email a
: message). I haven't found any FAQ's on this...
: I know this sounds like a job for PERL, and I actually do have the
: 'sigrandom' PERL program, but I know very little of the language (But I'm
: learning), and cannot figure out how to get it to work on my system.
: So, does anyone have any hints suggestions on making a script. Here's the
: only version I can get to work... any hints or suggegstions would be
: appreciated.
: cp $HOME/.sig/sig8 $HOME/.signature
: cp $HOME/.sig/sig7 $HOME/.sig/sig8
: cp $HOME/.sig/sig6 $HOME/.sig/sig7
: cp $HOME/.sig/sig5 $HOME/.sig/sig6
: cp $HOME/.sig/sig4 $HOME/.sig/sig5
: cp $HOME/.sig/sig3 $HOME/.sig/sig4
: cp $HOME/.sig/sig2 $HOME/.sig/sig3
: cp $HOME/.sig/sig1 $HOME/.sig/sig2
: cp $HOME/.signature $HOME/.sig/sig1
: Rudementary, but it works. Basically... I have 8 files named sig1-sig8 in
: a directory named .sig. I want a different file to be copied as
: $HOME/.signature every time I log in.
Sounds to me like you've seen one of my posts somewhere about...
------- Begin included C-shell script ---------
#!/bin/csh
set dir = `pwd`
cd
if ( $#argv > 1 ) then
echo "Usage: `basename $0` [number]"
exit 1
endif
@ k = (10000)
set names = ( `ls .sigs` )
@ max = $#names
if ( $#argv == 0 ) goto done
set k = ($1)
loop:
set q = `echo "$k[$#k]" | tr -d "[0-9]"`
if ( "`expr '$q' : '.*'`" == "0" ) goto done
ls .sigs | cat -n
echo -n "Choose> "
set k = ( `echo $<` )
if ( $k[1] == 'v' ) then
@ k2 = $k[$#k]
if ( $k2 > $max ) then
@ k2 = $max
endif
cat .sigs/$names[$k2]
set k = ( dummy dummy )
endif
goto loop
done:
if ( $k <= $max ) then
@ ran = $k
else
@ ran = `ksh 'echo $RANDOM'`
@ ran = ( $ran % $max + 1 )
endif
\rm .sig
cp ./.sigs/$names[$ran] .sig
cd $dir
----- End included C-shell script -----
: --
: |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
: | Stefan Lasiewski >>>CONTENTS UNDER PRESSURE<<< |
: | gan...@rahul.net >>>DO NOT PUNCTURE<<< |
: | http://www.rahul.net/gangrel |
Yup, it's still there ! Thanks a bunch!!!
'I've seen things you people wouldn't believe.
--Stefan Attack ships on fire off the shoulder of Orion.
I watched C-beams glitter in the dark near Tannhauser Gate...
o , All those moments will be lost in time,
. .:/ like tears in rain.
,,///;, ,;/ Time to die.'
. @{{{{{{{{{/// -Roy Batty, Replicant, 'Bladerunner'
){{{{{{{{{{\\\
''\\\\\'" ';\ gan...@rahul.net
'^ http://www.rahul.net/gangrel
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
_______ |.-----.| || jgs || ||_ _|| `--)-(--` __[=== o]___ |:::::::::::|\ `-=========-`()
,sSSs ,SSSS_/ ,_ sS/`))\// sS//|_(_/ _, SS\\\ `""-.-'` / sSS` jgs-==-'`'-._\
___________ | _______ | | | | | | | | | | | | | | |_______| | |___________|
//O\\
|\/\/\/| | | | | | (o)(o) C _) | ,___| | / /____\
|HHHHH/"\"\HHHHHHH| |HH`\|_.-)'|/'dP,H| |Hb.`\\_/_//'.oddH| |HHHb|`.\/\,'|HHHH| |HHHHHb/\/\/|HHHHH| |"""""""""""""""""| | |"" /\ \ / |"" | | |__/--\ \/ __| |
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this thread.
These messages were posted publicly to the newsgroup
alt.ascii-art
in 1996 and are 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 one of the authors? 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.