Re: Where to set up BASH_ENV?
From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 11/28/05
- Next message: Simon J. Rowe: "Re: Preventing multiple invocations of script from accessing the same file"
- Previous message: Meghavvarnam: "Re: Read strings from one file and search for them in a directory containing htm files"
- In reply to: paulaugust2003_at_yahoo.com: "Where to set up BASH_ENV?"
- Next in thread: Hubble: "Re: Where to set up BASH_ENV?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Nov 2005 03:06:16 -0500
On 2005-11-28, paulaugust2003@yahoo.com wrote:
> Hi,
>
> I am confused about setting up the environment variable BASH_ENV. What
> I want to achieve is that I can run a command in a remote machine in
> the following way:
>
> ssh username@remotemachine "some; commands;"
>
> However, it doesn't work because the commands I want to run remotely
> may contain aliases and other definitions that are only available if I
> login the remote machine interactively. Okay, since bash is my shell, I
> try the following way:
>
> ssh username@remotemachine "bash -c 'some; commands;'"
Pipe your commands to ssh:
printf "%s\n" ". ~/.bashrc" alias | ssh username@remotemachine
-- Chris F.A. Johnson, author | <http://cfaj.freeshell.org> Shell Scripting Recipes: | My code in this post, if any, A Problem-Solution Approach | is released under the 2005, Apress | GNU General Public Licence
- Next message: Simon J. Rowe: "Re: Preventing multiple invocations of script from accessing the same file"
- Previous message: Meghavvarnam: "Re: Read strings from one file and search for them in a directory containing htm files"
- In reply to: paulaugust2003_at_yahoo.com: "Where to set up BASH_ENV?"
- Next in thread: Hubble: "Re: Where to set up BASH_ENV?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|