Post Reply  Post Thread 
The time killing Bash command
Author Message
marioluvsfries
Unregistered


Post: #1
The time killing Bash command

As the title suggests, I'm working on a small bash command called "I'm bored" which just echoes something like  "Me too, your a boring user!" but I'm wanting to go further and add some conditions...

For example:

If user types "I'm bored" echo "Me too! You sure are a boring person to interact with" else echo "Does not compute!"

conditions:

If user typed "No your a boring computer/!" echo " Tongue " else echo "/n"

/n = ("Does not compute!"


If user typed "Your mean/!" or anything in the negative response dictionary echo "I'm bored let's play a game" else echo "/n"

If user typed "okay" or anything in the confirmation dictionary echo "Let's play 'who's smarter' me or you" else echo "/n"

If user typed"okay" or anything in the confirmation dictionary echo "Watch this"

//with additional batch command// //If user is suckered into playing this sadistic game then call the game bash command which calls on a random program or kills a non fatal system process (Something like the music player or something low priority) or even logs the user out//

I think I'm getting ahead of myself but I did try to create a text based adventure game with python a couple of months back but I couldn't figure out how to give it conditions :/

Forgot to how to define modules and stuff now though ....

That's just a very crappy rough draft for a beginner who's getting way over his head.

09-18-2012 05:29 PM
Quote this message in a reply
Lang



Posts: 6,499
Group: Registered
Joined: Feb 2006
Status: Offline
Post: #2
RE: The time killing Bash command

So, basically you are using bash script to create a conversation robot?


Brett Erlich Wrote:
Chris Christie is so fat, I was giving a presentation and he ate my pie charts.




All human beings are born free and equal in dignity and rights.   They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.

PROUD DISRUPTIVE DINGBAT

http://Siochanna.deviantart.com
http://neversubmit.xanga.com/

09-18-2012 10:33 PM
Visit this users website Find all posts by this user Quote this message in a reply
Gareth
Administrator
*******


Posts: 11,439
Group: Administrators
Joined: Jul 2004
Status: Offline
Post: #3
RE: The time killing Bash command

I once had a setup that used the Cyc database to spit out interesting but totally random facts




“Lanie, I’m going to print more printers. Lots more printers. One for everyone. That’s worth going to jail for. That’s worth anything.” - Printcrime by Cory Doctrow
09-18-2012 11:08 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: