On Tue, Jul 26, 2005 at 12:45:33PM -0400, michael ondrechak wrote: > Is there a way for a bash script to test if it's being run from an > interactive shell? That is, I want to be able to test whether the > script was started as: > > $ script > > or as > > $ script & > > I looked at bash's shopt command and while it discusses 'interactive' > shells, I didn't see anything that allows me to test for the > condition. Michael, This should answer it: http://theory.uwinnipeg.ca/localfiles/infofiles/bash/bashref_54.html -Vic -- Vic Gedris | Web: http://vic.gedris.org/ Toronto, Ontario | E-mail: vic-at-gedris-dot-org CANADA | Encrypted email preferred (D77B43FB)
Attachment:
signature.asc
Description: Digital signature