Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否支持执行任意命令 #86

Open
samanhappy opened this issue Sep 6, 2023 · 5 comments
Open

是否支持执行任意命令 #86

samanhappy opened this issue Sep 6, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@samanhappy
Copy link

很好的工具,但是我看文档好像必须要把shell命令定义在配置文件里面,是否可以支持执行任意命令,比如
easyctl exec date -c config.yaml
easyctl exec 'tail -f test.log' -c config.yaml

@weiliang-ms
Copy link
Owner

很好的建议,下个版本实现

@weiliang-ms
Copy link
Owner

v0.8.3版本已实装该功能

@weiliang-ms weiliang-ms added the enhancement New feature or request label Sep 6, 2023
@weiliang-ms weiliang-ms self-assigned this Sep 6, 2023
@samanhappy
Copy link
Author

samanhappy commented Sep 6, 2023

高效率,赞一个,exec执行普通命令是可以的,不过如果是easyctl exec 'tail -f test.log' -c config.yaml就会卡住,是否可以在track命令下也支持任意tail命令,或者是track后面可以输入任意文件

@weiliang-ms
Copy link
Owner

t

高效率,赞一个,exec执行普通命令是可以的,不过如果是easyctl exec 'tail -f test.log' -c config.yaml就会卡住,是否可以在track命令下也支持任意tail命令,或者是track后面可以输入任意文件

您的需求是不是:想将config.yaml内的部分配置项转换为命令行参数/标识,方便使用&变更

例如,执行命令格式:

$ easyctl tail-log <logfile name> <tail lines count>  -c config.yaml
  • 从头tail日志文件test.log
$ easyctl tail-log test.log -c config.yaml
  • tail test.log日志文件最后200行
$ easyctl tail-log test.log 200 -c config.yaml

@samanhappy
Copy link
Author

samanhappy commented Sep 6, 2023

是的,使用命令行参数更灵活

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants