Re: interactive test faulty

2012-03-22 Thread Greg Wooledge
On Thu, Mar 22, 2012 at 12:06:24PM +, Tim Dickson wrote: > put echo "$-" in a oneline bash script called test and make executable > *./test* > output is *ehB* > this should include the "i" in the output as the shell _is_ interactive No, a script is by definition a non-interactive shell. > *ec

Re: interactive test faulty

2012-03-22 Thread Pierre Gaston
On Thu, Mar 22, 2012 at 2:06 PM, Tim Dickson wrote: > eg a script called test2 as follows > #!/bin/bash > echo "type in your name" > read USERNAME > echo "hello $USERNAME" > > called via the shell by typing > ./test2 > is interactive, but $- special variable doe not indicate it is. It's not