当前位置:网站首页>[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
边栏推荐
- Educational codeforces round 126 (rated for Div. 2) f.teleporters (two sets and two points)
- The practice of beego framework developed by goweb: Section 4 database configuration and connection
- Why do I choose to use go language?
- The practice of beego framework developed by goweb: Section 4 database configuration and connection
- Unity shader realizes water wave effect with noise texture
- 高速电路中电容的选型和应用——详解
- Function接口之andThen
- High speed circuit design practice -- Overview
- Verilog daily question (vl27 settable counter)
- Encountered.Sqlite file processing during Android Development
猜你喜欢

Asynchronous circuit design -- principle and example of synchronous pulser

Firewalld防护墙

高速电路中电感的选型和应用

The practice of beego framework developed by goweb: Section 4 database configuration and connection

Mysql database addition, deletion, modification and query (detailed explanation of basic operation commands)

Linear algebra and matrix theory (7)

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

Jupyter notebook win installation record

GEAR: Graph-based Evidence Aggregating and Reasoning for Fact Verification

Using SQL server agent job to restore the database regularly
随机推荐
Pytorch Foundation: similarities and differences between torch.mul, torch.mm and torch.matmul
Janus series article 3 API usage guide videoroom creating a new video room
Vscode界面介绍
Iris framework practice of goweb development: project summary and review
Encountered.Sqlite file processing during Android Development
Leetcode 2022.04.10 China Merchants Bank special competition D. store promotion (DP)
线性代数及矩阵论(八)
Role of Fortress machine
如何在构建阶段保护镜像安全
2022牛客多校第二场CDE
Differences between CNSA and CASC and CASIC
Linear algebra and matrix theory (VIII)
How to protect image security during construction
The practice of beego framework in goweb development: Section I Introduction to beego framework
Linear algebra and matrix theory (IX)
Goweb开发之Beego框架实战:第二节 项目初始化配置
Verilog daily question (vl27 settable counter)
valarray数值库学习
Codeworks round 801 (Div. 2) and epic Institute of technology round D. tree queries (tree DP)
Algorithm learning: leetcode interview question 09. implement queue with two stacks