Re: shell script: How to determine if I'm in the background?
Sorry all of you.
This snip is from the info page (Bash -> Interactive Shells -> Is this
Shell Interactive? ):
Jaume Guasch <jaume.guasch=QlBsmsa8rgI@public.gmane.org> writes:
>
> "To determine within a startup script whether or not Bash is running
> interactively, test the value of the `-' special parameter. It
> contains `i' when the shell is interactive. For example:
>
> case "$-" in
> *i*) echo This shell is interactive ;;
> *) echo This shell is not interactive ;;
> esac
> "
>
Best regards,
Jaume
--
Reply to: