Question commands

So there is a whois, who, whoami etc, there is a which, there is a whereis, there is a whatis.
Those are the only ones I have found.
I have not found a how, I was thinking how is simple, if I just make how an alias for man that solves the lack of a how easily.
Why us really what stumps me…
LOL, what would a why command do.
It could spout random platitudes about the meaning of life or something but that is not so interesting.
I think why (or perhaps whyis) should do something meaningful…
What would you expect it to do?

Why? … sorry couldn’t resist that, and you must have seen it coming :slight_smile:

I don’t get the question… are we talking about your tamagotchi program? … and what response to give when a user enter “why”, if so all I can think of is that I wold expect a meaningful response… you have moods built in don’t you?.. how about a mood response like “bored” etc.

or have I got this totally wrong… is which case… Why? :wink:

No, I mean generally.

You don’t feel like you want to have a complete set of question commands?

I bet why could do something interesting…

Bah, you grown ups wanting everything to have a good reason… there is a who, a which, a where(is) a what(is)… how (on my computer) now runs man, when runs stat (because I googled this very issue and discovered I was not the first to try and complete my question commands and stole their ideas - and in the case of the man idea, we had the same one - great minds think alike) - there needs therefore to be a why…

After a brief pause (there is life besides computers):

I would recommend to buy O’Reilly’s Pocket Reference: http://oreilly.com/catalog/9780596006280

It’s handy but contains almost everything you need for your daily command life.

You don’t seem to get where I am coming from here xD.

There is no why command, try typing it, it does nothing, I want to have one. I could make any old executable and call it why and have one, but it would be more fun if it did something contextual and interesting. Alas at that point my imagination fails me.

Plus I have that book from the library on oversummer loan.

#!/usr/bin/perl -w
############################################
# BOfH Random Excuse Generator
# Word list from the BOfH Excuse board
# [http://bofh.ntk.net/ExcuseBoard.html]
# Copyright 2001, Simon Travaglia
#
# BOfH stories @ :
# http://www.theregister.co.uk/content/30
# and http://bofh.ntk.net/Bastard.html
#
#
# perl by mexnix [http://mexnix.perlmonk.org
############################################

use strict;

my @words1 = qw(Temporary	Intermittant	Partial 
	       Redundant	Total		Multiplexed
	       Inherent		Duplicated	Dual-Homed
	       Synchronous	Bidirectional	Serial
	       Asynchronous	Multiple	Replicated
	       Non-Replicated	Unregistered	Non-Specific
	       Generic		Migrated	Localised
	       Resignalled	Dereferenced	Nullified
	       Aborted		Serious		Minor
	       Major		Extraneous	Illegal
	       Insufficient	Viral		Unsupported
	       Outmoded		Legacy		Permanent
	       Invalid		Deprecated	Virtual
	       Unreportable	Undetermined	Undiagnosable
	       Unfiltered	Static		Dynamic
	       Delayed		Immediate	Nonfatal
	       Fatal		Non-Valid	Unvalidated
	       Non-Static	Unreplicatable	Non-Serious);

my @words2 = qw(Array		Systems		Hardware
	       Software		Firmware	Backplane
	       Logic-Subsystem	Integrity	Subsystem
	       Memory		Comms		Integrity
	       Checksum		Protocol	Parity
	       Bus		Timing		Synchronisation
	       Topology		Transmission	Reception
	       Stack		Framing		Code
	       Programming	Peripheral	Environmental
	       Loading		Operation	Parameter
	       Syntax		Initialisation	Execution
	       Resource		Encryption	Decryption
	       File		Precondition	Authentication
	       Paging		Swapfile	Service
	       Gateway		Request		Proxy
	       Media		Registry	Configuration
	       Metadata		Streaming	Retrieval
	       Installation	Library		Handler);

my @words3 = qw(Interruption	Destabilisation	Destruction
	       Desynchronisation Failure	Dereferencing
	       Overflow		Underflow	NMI
	       Interrupt	Corruption	Anomoly
	       Seizure		Override	Reclock
	       Rejection	Invalidation	Halt
	       Exhaustion	Infection	Incompatibility
	       Timeout		Expiry		Unavailability
	       Bug		Condition	Crash
	       Dump		Crashdump	Stackdump
	       Problem		Lockout);

# Optional 4th word
my @words4 = qw(Error		Problem		Warning
	       Signal		Flag);

my $word1 = $words1[rand(scalar(@words1))];
my $word2 = $words2[rand(scalar(@words2))];
my $word3 = $words3[rand(scalar(@words3))];
my $word4 = $words4[rand(scalar(@words4))];

print "\nWhy: ";
print "$word1 $word2 $word3 $word4\n\n";
alias why="`pwd`/excuse.sh"
Sample:
$ why

Why: Undiagnosable Backplane Underflow Signal


Happy? :wink:

Brilliance! :smiley:

My thoughts exactly… (once I understood the question :wink: ), but I thought I’d let you respond first.

Its output possibilities had me in stitches for ages :slight_smile:

“Fatal Hardware Exhaustion Warning” is particularly worrying :o

How? sorry couldnt resist :stuck_out_tongue:

But I found that there is no why command either, and I agree with Sophia it should have something meaningful…

like

"how@who: why me

Your the son of jesus

Have a nice day"

LOL.

sorry.

There’s no end of obscure / historical system-type commands knocking around … try “lastlog” …

Or open a few terminal sessions, then in one try;

echo "Hello Everyone!" | wall

Or fun with colours, how about;

tput clear ; tput setf 1 ; echo HELLO WORLD IN BLUE ; tput setf 0

Or how about some GUI from the BASH command prompt?

zenity --question --text "Are you sure?"

:slight_smile:

Last month or something I tried wall on the university server to see if it worked, and then I reaaaallly hoped that no-one else could see it…

…some people seemed to be accepting messages though.

cringe

That zenity thing is cool!