Hey what's up Dawg? (Generic Chat Thread)

General discussion.
Post Reply
User avatar
kob
CyberDemon
Posts: 12768
Joined: Sun Nov 14, 2004 14:40
Consoles: PS3 - PC
Location: get slam'd
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by kob » Sun Jun 05, 2016 20:27

oh yeah you're right about the if statement whoops.

i ended up fixing it. i think the issue was with the touch command. vi 'filename' actually opens and creates so i have no idea why i bothered using touch in the first place. live and learn, haha, thanks.

EDIT: question about loops. i've got a variable set to 1 and until that variable is equal to 0 the loop will keep going. inside the loop it'll change the variable to 0 if certain conditions are met. is there anything wrong with doing this? trying not to develop bad habits.

User avatar
Saladin
Spider Mastermind
Posts: 8367
Joined: Mon Aug 11, 2003 22:39
Consoles: PS4 PS3 Wii Wii-U PC
Location: DANCE MASTAH!
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by Saladin » Sun Jun 05, 2016 21:14

No, most programming languages have that built in automatically. They're called "While" loops. As in, "do x While y is true".

Then they'll have something called an exit, where you can just leave the loop by typing something like Exit While, which you typically do under some set condition.

Keep in mind though, that there's a subtle difference between exiting a loop and setting its loop condition to false. Namely, setting the condition to false (0 in this case) will only take effect when the check is made at the beginning of the next loop. So any code you write after setting the condition to 0 will still run until the loop starts over and does its check.
Quack wrote:ok but so now what do I do besides masturbate

User avatar
kob
CyberDemon
Posts: 12768
Joined: Sun Nov 14, 2004 14:40
Consoles: PS3 - PC
Location: get slam'd
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by kob » Sun Jun 05, 2016 22:16

well bash has while loops but setting up that condition can sometimes be tricky because i'm not familiar with all the syntax and everything yet.

this menu option was for sending emails and i was supposed to check if the username exists first and pop out an error message if not. basically I made an until loop set around whether the variable is 1 or 0. if the username exists set the variable equal to 0, ending the loop. if not, keep prompting the user for a valid username. here's the actual code if it helps make more sense:

Code: Select all

        validUser=1
                 until [ $validUser -eq 0 ] 
                        do
                                echo -n "Please enter the username of the recipient: "
                                read emailUsername
                                if getent passwd $emailUsername  > /dev/null
                                        then
                                                validUser=0 
                                        else
                                                echo "$emailUsername is not a valid user. Please enter a different name."
                                fi
                        done
i feel like i'm doing some workaround patchwork kinda shit? i mean it works just fine, but i'm not sure if this is a bad thing to do.

User avatar
Saladin
Spider Mastermind
Posts: 8367
Joined: Mon Aug 11, 2003 22:39
Consoles: PS4 PS3 Wii Wii-U PC
Location: DANCE MASTAH!
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by Saladin » Mon Jun 06, 2016 05:01

Seems fine to me.

"Bad code" is that which is hard to maintain/read or doesn't fit the project's parameters. Otherwise, if it works, it ain't bad.
Quack wrote:ok but so now what do I do besides masturbate

User avatar
Mr. Smith
Spider Mastermind
Posts: 9442
Joined: Mon Dec 24, 2007 06:44
Consoles: 360, PC, Apple Faggot Machine
Location: In your sister

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by Mr. Smith » Mon Jun 06, 2016 19:07

Back to working full time, still scraping by, lol.
OBrocks wrote:i need to know if ill actually be getting a penis pump in the mail so i can prepare an explanation for my parents
Saladin wrote:I do not want to play two truths and a lie with Smith.
Quack wrote:PF BATTLE ROYALE 2015: EVERYONE DRAWS SALADIN LICKING HIS OWN BUTTHOLE

User avatar
Saladin
Spider Mastermind
Posts: 8367
Joined: Mon Aug 11, 2003 22:39
Consoles: PS4 PS3 Wii Wii-U PC
Location: DANCE MASTAH!
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by Saladin » Mon Jun 06, 2016 21:55

Where ya working these days?
Quack wrote:ok but so now what do I do besides masturbate

User avatar
Mr. Smith
Spider Mastermind
Posts: 9442
Joined: Mon Dec 24, 2007 06:44
Consoles: 360, PC, Apple Faggot Machine
Location: In your sister

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by Mr. Smith » Sun Aug 28, 2016 18:32

I am now a nurse administrator.
OBrocks wrote:i need to know if ill actually be getting a penis pump in the mail so i can prepare an explanation for my parents
Saladin wrote:I do not want to play two truths and a lie with Smith.
Quack wrote:PF BATTLE ROYALE 2015: EVERYONE DRAWS SALADIN LICKING HIS OWN BUTTHOLE

User avatar
Saladin
Spider Mastermind
Posts: 8367
Joined: Mon Aug 11, 2003 22:39
Consoles: PS4 PS3 Wii Wii-U PC
Location: DANCE MASTAH!
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by Saladin » Mon Aug 29, 2016 16:09

Sweet. Are you working towards being a doctor or you sticking with nursing?

Also, what branch of medicine? Something gross and gnarly or more ordinary?
Quack wrote:ok but so now what do I do besides masturbate

User avatar
Mr. Smith
Spider Mastermind
Posts: 9442
Joined: Mon Dec 24, 2007 06:44
Consoles: 360, PC, Apple Faggot Machine
Location: In your sister

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by Mr. Smith » Tue Aug 30, 2016 04:42

Saladin wrote:Sweet. Are you working towards being a doctor or you sticking with nursing?

Also, what branch of medicine? Something gross and gnarly or more ordinary?
Administration only, I do not want to work with sick people, plus 67k a year isn't bad at all. lol
OBrocks wrote:i need to know if ill actually be getting a penis pump in the mail so i can prepare an explanation for my parents
Saladin wrote:I do not want to play two truths and a lie with Smith.
Quack wrote:PF BATTLE ROYALE 2015: EVERYONE DRAWS SALADIN LICKING HIS OWN BUTTHOLE

User avatar
Saladin
Spider Mastermind
Posts: 8367
Joined: Mon Aug 11, 2003 22:39
Consoles: PS4 PS3 Wii Wii-U PC
Location: DANCE MASTAH!
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by Saladin » Tue Aug 30, 2016 18:17

Yeah, that's good money. Do you get benefits too? Aren't the shifts like super long?
Quack wrote:ok but so now what do I do besides masturbate

User avatar
Mr. Smith
Spider Mastermind
Posts: 9442
Joined: Mon Dec 24, 2007 06:44
Consoles: 360, PC, Apple Faggot Machine
Location: In your sister

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by Mr. Smith » Fri Sep 02, 2016 06:29

Yes, and they shifts rang from 8-12 hours.
OBrocks wrote:i need to know if ill actually be getting a penis pump in the mail so i can prepare an explanation for my parents
Saladin wrote:I do not want to play two truths and a lie with Smith.
Quack wrote:PF BATTLE ROYALE 2015: EVERYONE DRAWS SALADIN LICKING HIS OWN BUTTHOLE

User avatar
kob
CyberDemon
Posts: 12768
Joined: Sun Nov 14, 2004 14:40
Consoles: PS3 - PC
Location: get slam'd
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by kob » Fri Sep 02, 2016 16:15

sounds right. my sister is a nurse and she works 3 12s. having all those days off makes it worth it.

User avatar
burnfire88
Spider Mastermind
Posts: 5509
Joined: Wed Oct 11, 2006 18:56
Consoles: PENIS PENIS PENIS PENIS PENIS PENIS PENIS PENIS PENIS PENIS PENIS
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by burnfire88 » Wed Sep 07, 2016 04:36

Yep.

Image

Image
Image
OB_rocks13 wrote:Chill

As soon as you become mod, ban ransom for a day

if you have the balls to do it

User avatar
Saladin
Spider Mastermind
Posts: 8367
Joined: Mon Aug 11, 2003 22:39
Consoles: PS4 PS3 Wii Wii-U PC
Location: DANCE MASTAH!
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by Saladin » Wed Sep 07, 2016 19:10

What happened? Did you get side swiped?
Quack wrote:ok but so now what do I do besides masturbate

User avatar
youdiedtooeasily
Baron of Hell
Posts: 4213
Joined: Tue Apr 19, 2005 16:45
Consoles: PC, PS3
Location: Glendale, AZ
Contact:

Re: Hey what's up Dawg? (Generic Chat Thread)

Post by youdiedtooeasily » Thu Sep 08, 2016 00:18

he hit a deer. is there like insurance coverage for that? random animals cucking themselves clause?

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests