Another option would be to put the things that emit output in ~/.bash_profile instead of .bashrc. ~/.bash_profile runs for interactive "login" shells, and ~/.bashrc is run for all shells. Bashrc is really designed for things that set environment, not things that interact with / communicate to the user.
--Jeremy On Mon, 2004-04-05 at 16:50, Brian A. Henning wrote: > Hi All, > Thanks especially to Aaron Joyner for the very useful info about bash > interactive stuff. The following if clause in my .bashrc works for my > installation (RH7.3): > > if [ -n "`echo $- | grep i`" ]; then > # commands that produce output > fi > > I'm sure some of you are laughing at what is probably a roundabout way to > look for 'i' in the $- variable.. That's just what I came up with first, > not being a bash script maven. :-) -- /---------------------------------------------------------------------\ | Jeremy Portzer [EMAIL PROTECTED] trilug.org/~jeremy | | GPG Fingerprint: 712D 77C7 AB2D 2130 989F E135 6F9F F7BC CC1A 7B92 | \---------------------------------------------------------------------/
signature.asc
Description: This is a digitally signed message part
-- TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ : http://trilug.org/faq/ TriLUG Member Services FAQ : http://members.trilug.org/services_faq/ TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
