Bash-远程库 [英] Bash - Remote Library

查看:54
本文介绍了Bash-远程库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们是两个在Bash工具箱上工作的学生,我们遇到了一个问题:

We're two student working on a Bash Tools Box, and we come across a problem :

我们的本地脚本使用功能,这些功能存储在两个本地库中.

Our local script use functions, stocked in two local libraries.

我们的脚本使用第一个库中的函数,而最后一个使用第二个库中的函数.

Our script uses functions inside the first library, and this last uses functions inside the second one library.

脚本<-库1<-库2

Script <-- Library1 <-- Library2

我们不能将两个库融合在一起.

We can't fusion the two libraries in one.

我们实际上使用此命令在远程计算机上运行脚本:

We actually use this command to run our script on a remote computer :

ssh login@remoteIP bash < ~/script.sh

问题是:如何在脚本中设置库位置

The question is : How to set in the script the library location

推荐答案

使用 bashpp .

#include 替换.调用,然后通过 bashpp 运行它:

Replace your . calls with #include and then run it through bashpp:

bashpp ~/script.sh | ssh login@remoteIP bash -s

这篇关于Bash-远程库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆