Author: techfox9

Identify bash interactive shell..

Tuesday, November 11th, 2008 @ 12:23 pm


export __BASHIAS=0
if [ "$(echo $- | grep -c i)" == 1 ]
then
	export __BASHIAS=1
fi

...

if [[ ${__BASHIAS} = 1 && ... ]]
then
	...
fi

Linux


 


Comments are closed.