当前位置:网站首页>[ansible] the ansible shell encountered the problem of $symbol in awk when executing remote commands
[ansible] the ansible shell encountered the problem of $symbol in awk when executing remote commands
2022-07-28 17:27:00 【kiraraLou】
Preface
In the use of ansible coordination awk Naming times error .
The original order :
ansible presto -m shell -a "ps -ef|grep -i presto |grep -v grep|awk '{print $2}' |xargs jstack |grep JNI"
extract presto process pid Back to failure , as a result of ansible Set category awk Of $ There is a problem with the symbol
Solution :
take $ The symbols are escaped
ansible presto -m shell -a "ps -ef|grep -i presto |grep -v grep|awk '{print \$2}' |xargs jstack |grep JNI"
Or write the command as a script , Remote script execution
边栏推荐
- Andthen of function interface
- Message Passing for Complex Question Answering over Knowledge Graphs
- Function接口之andThen
- MySQL详细学习教程(建议收藏)
- 【presto 】presto 新版本升级详情
- net框架
- The practice of beego framework in goweb development: Section I Introduction to beego framework
- Role of Fortress machine
- Verilog daily question (vl27 settable counter)
- 格雷码和二进制的转换及典型例题(4bits格雷码计数器)
猜你喜欢

Verilog 每日一题(VL2 异步复位的串联T触发器--牛客网)

The practice of the beego framework of goweb development: Section II project initialization configuration

微服务架构-服务注册中心和服务网关(6.8) (转载)

Verilog 每日一题(VL14 自动贩售机1--FSM常见题型)

How to protect image security during construction

Use Alibaba cloud's free SSL certificate

Atcoder regular contest 133 d.range XOR (digital dp+ classification discussion)

Azure Devops developed by visual studio 2015 team

Janus series article 3 API usage guide videoroom creating a new video room

Verilog 每日一题 (VL27 可置位计数器)
随机推荐
How do we do full link grayscale on the database?
Round 1A 2022 - Code jam 2022 c.weightlifting (interval DP)
Codeworks round 801 (Div. 2) and epic Institute of technology round D. tree queries (tree DP)
CNSA与CASC和CASIC的区别
Visual Studio 2012/2015发布Web应用连同.cs源码一起发布
批量下载文件
In some cases, error: (XX, XX) failed to resolve: XXXXXX.
Analysis of browser decoding process
Goweb开发之Beego框架实战:第三节 程序执行流程分析
The actual combat of the beego framework of goweb development: Section III program execution process analysis
Firewalld防护墙
Visual studio 2012/2015 releases web applications together with.Cs source code
部署LAMP平台---Linux,Apache,MySQL,PHP的编译安装
Modeling Semantics with Gated Graph Neural Networks for KBQA
Leetcode 2022.04.10 China Merchants Bank special competition D. store promotion (DP)
微服务架构-服务注册中心和服务网关(6.8) (转载)
Linear algebra and matrix theory (7)
Verilog daily question (vl27 settable counter)
【presto】presto 常用的命令
Application system log structure of elastic stack