A little perl script to spice up your unix shell startup

Content of perl script
-----------
use strict;

$/ = "\n%%%\n"; #define separator for array
open ARTS, "art.dat" or die $!;
my @file = <arts>;
my $random = rand(@file);

my $ascii_art = $file[$random];
$ascii_art=~s/\n%%%\n//; #remove the separator string
print $ascii_art, "\n";

----------

sample content of art.dat, you can get more from the mentioned web site or newsgroup
(sample below taken from http://www.chris.com/ASCII/)
----------

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$*" *$$$$$$$$$$$$$$$$$$$$$$$$$$$" "*" *$$$$$$" ^$$$"$$$$$$$$$$$
$$$$$$$$$" z$P"$$$$$$$$$$$$$$$$$$$$$$$$P e$"e4$b. "$$" d$ $P $$$$$$$$$$$$
$$$$$$$" .$$$ J$$$$$$$$$$$$$$$$$$$$$$$" .$Pz$$4$$$$c z" $$*" z$$$$$$$$$$$$$
$$$$$$ 4$$$$$$$$$$$$$$$$$$$$$$$$$$$P z$$4$$%$$$$$$$d " z$$$$$$$$$$$$$$$
$$$$P z$$$* er$$$* ze$$P .$ $$ $F d$$ $$Fz$$$$$$$ $$P$$$$$$$$$$$$$$$$$$
$$$P 4$$$" $$F$$" $" $" z$% J$$$$F d$$$ *"d$$$$$$$ $$Pd$$$$$$$$$$$$$$$$$$
$$$ .$$$ $c* " $$b$" z$P .$$$$P 4$$$$$$$$$$$$$$ d$Pd$$$$$$$$$$$$$$$$$$$
$$ $$$" 4$$%$ 4$$$" $$ $P$$$ $$$""$$$$$*"$$% 4$"$$P"*""$$$$$$$$$$$$$$
$F 4$$$ $$Fd$ $$$" $$ dPd$$" $$" z$ $$" d$ $ $\$$ dP 4$$$$$$$$$$$$$$
$ $$$F *"d$F $* r * "J$$$ .$% .$$.$" .$$J d$$ $$ $$$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$^$$$$$$$$$
$$$$$$$$F ...d$$$*" 4Pz$$$$\d$$$$$$$$$
$$$$$$$$F d$$$$*" d$$$5d$$$$$$$$$$$
$$$$$$$$F zd$$$$$ .ec .$$$Pz$$$$$$$$$$$$$
$$$$$$$$F .e$$" $$F $$$r $$$"4$$$$$$$$$$$$$$
$$$$$$$$F 4$$" 3$$ *$$$ d$$\$4$$$$$$$$$$$$$$
$$$$$$$$F 4$$ *$$r d$$)$$4$$$$$$$$$$$$$$
$$$$$$$$F . 4$$ 3$$$$$"4$$4$$$$$$$$$$$$$$
$$$$$$$$F $$. .d d$$ $$$$" 4$$4$$$$$$$$$$$$$$
$$$$$$$$F $$4$$cd$$ $$$ 3$$$ 4$$4$$$$$$$$$$$$$$
$$$$$$$$F $$4$$$$$$ $$$ """ 4$$4$$$$$$$$$$$$$$
$$$$$$$$F $$4$$$$$$ 4$$ 4$$4$$$$$$$$$$$$$$
$$$$$$$$F $P4$$$$$$ 4$$4$$$$$$$$$$$$$$
$$$$$$$$F \d$$$$$$$ ')d$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$Gilo94'$$

%%%



-----------


After these two files are created in your unix home directory. Update your .profile or any startup script of your shell with

perl [your script filename] art.dat

Comments

Popular posts from this blog

Outlook : "operation failed, object could not be found. " when trying to close a PST.

How to transfer app and data from old iPhone to new iPhone for model IOS17 and IOS18 above.

Troubleshooting Outlook Express (IMAP, POP3, HTTP, NEWS) with the log file