This is a fairly common question it seems. One answer that might be helpful can be found here.
In reply to Re: Can a script tell if it is being run from inside a script versus in an interactive terminal session?
by boftx
in thread Can a script tell if it is being run from inside a script versus in an interactive terminal session?
by hepcat72
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |