[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] How to add fortune output to terminal

On Sun, Apr 13, 2008 at 12:27:15AM -0600, Bob Proulx wrote:
> Angus Auld wrote:
> > Would someone be able to advise me as to what is a
> > safe method to add a fortune command to my .bashrc
> > file so as to have fortune output in my terminal @
> > login?
> > I've googled this pretty extensively, and have found a
> > few methods, but also warnings that certain processes
> > can be broken by doing this.
> Your .bashrc should be completely silent.  If it produces any output
> then it will break 'scp' and 'rsync' at the least.  Probably other
> tools that use a remote shell such as cvs, git, etc.
>   http://www.openssh.org/faq.html#2.9

"[...] for non-interactive sessions."

amp@think:~$ tail -7 .bashrc

echo "Fortune cookie:"
fortune -a

amp@think:~$ ssh localhost /bin/true

If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)

Attachment: signature.asc
Description: Digital signature

Reply to: