Skip to contentSkip to conversation

Adding 'random' features

DISCUSSION xlp 2 participants 2 messages Jun 27, 2002

lore
Share & tools
lore

xlp

author
#0 lore raw

hi, i have certain binary and I want that each 3 times the file is executed, it perform different things that it does normally. I can do that one time YES and other no:
if file a exists -> then do smthg; rm file a
if ! file a exists -> then do smthg; touch file a

Now, I want to 3 times!.

anyone?

#1 lore raw

That doesn't seem like C to me...
Anyway instead of using the existance of a file (which obviously only has two possible status) try storing something in the file :-)

----- Original Message -----
From: "xlp" <[email protected]>
To: <[email protected]>
Sent: Thursday, June 27, 2002 10:20 AM
Subject: Adding 'random' features

Quoted 1 line

hi, i have certain binary and I want that each 3 times the file is

executed, it perform different things that it does normally.

Quoted 10 lines

I can do that one time YES and other no:
if file a exists -> then do smthg; rm file a
if ! file a exists -> then do smthg; touch file a

Now, I want to 3 times!.

anyone?

-
To unsubscribe from this list: send the line "unsubscribe

linux-c-programming" in

Quoted 3 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html