Your browser does not seem to support CSS. If images appear below, please disregard them.
Topic Options
Rate This Topic
#16767 - 12/03/02 05:15 AM Useless Bash Script
Joined: Mar 2002
Posts: 217
Asteos Offline
Member
Asteos Offline
Member

Joined: Mar 2002
Posts: 217
Nadia
Okay So I Was Incredibly Bored Tonight And So I Thought I'd Just Post An Absolutely Useless Bash Program I Wrote. I Wasn't Sure Whether To Post It In "Off-Topic" "Programming" Or "*nix Security." Being as Though This Section Of The BBS Rarely Gets Traffic, I Thought I'd Post It Here.

#!/bin/bash
declare Name="1"
while [ "$Name" -eq "1" ]
do
clear
echo ""
echo "What's Mah Name, Bitch!?"
echo ""
echo "1. Fucked If I Know"
echo "2. Asteos, The Master Of The Linux Dojo"
echo ""
echo "Enter You Selection: "
read Name
done
echo "Damn StraighT!!"

So If You Don't Type The Second Selection Nothing Is Supposed To Happen So You're Basically Forced To Call Me The Master Or You Don't go Anywhere. Well, Almost Anywhere. If You Type Any Number Other Than One It Will Echo "Damn StraighT!!" Pretty funny, I Thought. I'm Not The Linux-Dojo-Master Just Yet, Or I Would Have Made This Do Much More, But Just In Good fun. Oh Well


=~ s/boredom/ studies/g
Top
Sponsored Links
#16768 - 12/03/02 06:26 AM Re: Useless Bash Script
Joined: Mar 2002
Posts: 1,041
Infinite Offline
UGN Elite Poster
Infinite Offline
UGN Elite Poster

Joined: Mar 2002
Posts: 1,041
Canada eh
Hehe. You started this topic so...

You should change the operator in the while statment to force the person to say are you are the shit. eg:

#!/bin/bash
declare Name="1"
while [ "$Name" != "2" ]
do
clear
echo ""
echo "What's Mah Name, Bitch!?"
echo ""
echo "1. Fucked If I Know"
echo "2. Asteos, The Master Of The Linux Dojo"
echo ""
echo "Enter You Selection: "
read Name
done
echo "Damn StraighT!!"

Top
#16769 - 12/04/02 03:27 AM Re: Useless Bash Script
Joined: Mar 2002
Posts: 217
Asteos Offline
Member
Asteos Offline
Member

Joined: Mar 2002
Posts: 217
Nadia
Hell Yeh! It Worked. I Don't Get It Though, You Changed The Value of $Name to 1, but Then Within The While Loop You Just Added A "!="2"" What does "!" Stand for?


=~ s/boredom/ studies/g
Top
#16770 - 12/05/02 12:14 AM Re: Useless Bash Script
Joined: Mar 2002
Posts: 56
spectre Offline
Junior Member
spectre Offline
Junior Member

Joined: Mar 2002
Posts: 56
192.168.128.80
!= means Does not equal. So basically, while name does not equal 2, keep looping, which forces the user to press 2.

Top
#16771 - 12/05/02 12:28 AM Re: Useless Bash Script
Joined: Mar 2002
Posts: 626
hKzKnight Offline
Member
hKzKnight Offline
Member

Joined: Mar 2002
Posts: 626
LAN
LOL very intresting, does show a person who is bored. Still trying to figure if this should stay in *nix or be in programming, bah i'll keep it.


-hKzKnight
"The ghost... Was never there and you'll never see me"
Top

Member Spotlight
Gremelin

Gremelin
Portland, OR; USA
Posts: 7,195
Joined: February 2002
Show All Member Profiles 
Sponsored Links
Forum Statistics
Forums46
Topics46,484
Posts81,654
Members2,157
Most Online1,567
Apr 25th, 2010
Latest Postings
Top Posters(All Time)
UGN Security 39,648
Gremelin 7,195
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860