Your browser does not seem to support CSS. If images appear below, please disregard them.
It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a Donation to help aid in operating costs.
Previous Thread
Next Thread
Print Thread
Rate This Thread
#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
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!!"

#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
#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.

#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"
Sponsored Links

Member Spotlight
Gremelin
Gremelin
Portland, OR; USA
Posts: 7,195
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Forums45
Topics46,798
Posts81,968
Average Daily Posts11
Members2,159
Most Online1,567
Apr 25th, 2010
Latest Postings
Top Posters(All Time)
UGN Security 39,962
Gremelin 7,195
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Liked Users (All Time)
§intå× Likes: 1
Cold Sunn Likes: 1
Crime Likes: 1
Cyrez Likes: 1
Ghost Likes: 1
Gremelin Likes: 4
Ice Likes: 1
unreal Likes: 1
Top Liked Users (30 Days)
Powered by UBB.threads™ PHP Forum Software 7.6.0
(Snapshot build 20160902)