> -----Original Message-----
> From: Postman Pat [mailto:[EMAIL PROTECTED]]
> 
> 
> Greetings,
> I want to write a script that will check to see if it was called from 
> another script, if not it will display a message saying for 
> instance this 
> script is meant to be called from other script & not run 
> interactively for 
> instance otherwise if called from a script will do it's 
> intended purpose...
> 
> Is there a way that I can actually get this working properly?


I am sure there is some fancy way to do this but If I understand the problem
correctly.

If a certain script is the only one allowed to call the program pass it a
unique parameter like


system ("program big_bollocks");

In the program that gets called check the parameter


if ($ARGV[n] -eq "big_bollocks") {

print "You are calling this program incorrectly";

exit 0;
} 


The code above is probably wrong but it demonstrates a simple method to
achieve what you want providing you are able to modify the calling script.

Harry




*************************************************************************************
COLT Telecommunications
Registered in England No. 2452736
Registered Office: Bishopsgate Court, 4 Norton Folgate, London E1 6DQ
Tel. +44 20 7390 3900

This message is subject to and does not create or vary any contractual
relationship between COLT Telecommunications, its subsidiaries or 
affiliates ("COLT") and you. Internet communications are not secure
and therefore COLT does not accept legal responsibility for the
contents of this message.  Any view or opinions expressed are those of
the author. The message is intended for the addressee only and its
contents and any attached files are strictly confidential. If you have
received it in error, please telephone the number above. Thank you.
*************************************************************************************


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to