Re: [freebsd-questions] Dangers of using a non-base shell
On 2007-10-30 20:39, Howard Jones [EMAIL PROTECTED] wrote: Benjamin M. A'Lee wrote: You could possibly also put bash -l exit in your .shrc, which would exit if bash exited successfully. I haven't tested it, but it should work. or 'exec bash -l' which will replace the existing shell with bash in memory, rather than run it from it as a subprocess. I was going to verify that that's the technical explanation, but 'man exec' gets you the utterly useless builtin(1) manpage. It is a fairly ok description of the technical behavior. See my similar suggestion for using: tcsh# exec env SHELL=/usr/local/bin/bash bash -l bash# The effect is that you only have to type exit once, anyway. Yup :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [freebsd-questions] Dangers of using a non-base shell
Benjamin M. A'Lee wrote: You could possibly also put bash -l exit in your .shrc, which would exit if bash exited successfully. I haven't tested it, but it should work. or 'exec bash -l' which will replace the existing shell with bash in memory, rather than run it from it as a subprocess. I was going to verify that that's the technical explanation, but 'man exec' gets you the utterly useless builtin(1) manpage. The effect is that you only have to type exit once, anyway. Howie ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: [freebsd-questions] Dangers of using a non-base shell
On Tue, Oct 30, 2007 at 08:39:00PM +, Howard Jones wrote: Benjamin M. A'Lee wrote: You could possibly also put bash -l exit in your .shrc, which would exit if bash exited successfully. I haven't tested it, but it should work. or 'exec bash -l' which will replace the existing shell with bash in memory, rather than run it from it as a subprocess. I was going to verify that that's the technical explanation, but 'man exec' gets you the utterly useless builtin(1) manpage. The effect is that you only have to type exit once, anyway. I was going to suggest exec, but if bash then failed to execute, you'd be immediately logged out of sh as well. My suggestion would execute bash if it could, and drop back to sh if bash failed. There may be a better way of doing it, and you can always get a shell prompt some other way if needs be, but this is what works for me. -- Benjamin A'Lee :: [EMAIL PROTECTED] Subvert Technologies :: http://subvert.org.uk/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]