Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: checking external program for availability?

by elwarren (Curate)
on Dec 22, 2004 at 00:24 UTC ( #416658=note: print w/ replies, xml ) Need Help??

in reply to checking external program for availability?

Incase you didn't notice in the first post using grep, the -x function tests whether a file is executable. Like so:

if ( -x '/path/to/file' ) { # file is executable, run it system('/path/to/file'); } else { # whatever system('/run/something/else'); }

Comment on Re: checking external program for availability?
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://416658]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (15)
As of 2015-07-31 14:58 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (278 votes), past polls