help-bash
[Top][All Lists]
Advanced

[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


From: Pierre Gaston
Subject: Re: [Help-bash] Where is the exit coming from when invoking bash -i from command line?
Date: 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'
>
> EOF
> ~$ ./main.sh
> testuser
> testuser exit
> $ echo $USER
> testuser
>
> --
> Regards,
> Peng
>
> bash prints it when it is interactive and exits:
$ bash -ic exit
exit


reply via email to

[Prev in Thread] Current Thread [Next in Thread]