English 中文(简体)
在通过弹 执行指挥的同时,从大事中找到环境
原标题:Getting environment from .profile while executing a command through ssh

我是世界气球/群的新鲜事。 我要在一台遥远的机器上开一个 make子。 为此,我对希望通过sh子执行的遥控机器制造了几处文字。

文字审视了这样的情况:

echo "loading .profile"
. ~/.profile
echo "profile loaded"
echo "starting gmake"
cd ~/helloWorld/
gmake all

我以下列 command子来援引文字:

ssh user@remotehost "cd ~/helloWorld && ./myscript.sh"

当我执行这一指挥时,我的机器与遥远的机器相联。 它告诉我,该简介是装满的,然后我必须报到[CTRL]+[D],以便继续使用文字。 因此,看来,<代码>. /myscript.sh的指挥像一个新终端一样产生一些东西。 我不想这样做。 我愿利用冲锋枪使建筑过程自动化,而无需人工关闭终点站。 是否有办法这样做?

Thanking you in anticipation, John

问题回答

<代码>/source 不得援引新的炮弹。 它在目前的军机中指挥。 另一些则是错误的。





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签