Skip to content

Instantly share code, notes, and snippets.

@pius
Created November 5, 2009 15:16
Show Gist options
  • Save pius/227108 to your computer and use it in GitHub Desktop.
Save pius/227108 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use POSIX;
if (ttyname(1)){
print "Shell\n";
}
else {
print "Cron\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment