[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Where is the exit coming from when invoking bash -i from
Re: [Help-bash] Where is the exit coming from when invoking bash -i from command line?
Wed, 11 May 2016 09:10:11 +0300
On Wed, May 11, 2016 at 7:01 AM, Peng Yu <address@hidden> wrote:
> Hi, I see `exit` is shown below. But I don't understand where it is
> coming from. Does anybody know?
> ~$ cat main.sh
> #!/usr/bin/env bash
> # vim: set noexpandtab tabstop=2:
> bash --init-file <(echo "export PS1='\u '") -i <<'EOF'
> ~$ ./main.sh
> testuser exit
> $ echo $USER
> bash prints it when it is interactive and exits:
$ bash -ic exit