---
title: "awk 输出单引号"
author: "jickcai"
date: "2023-11-29T09:55:57Z"
tags: ["awk"]
categories: ["移动开发"]
slug: "awk"
draft: false
lastmod: "2023-11-29T09:55:57Z"
id: 2539593
url: "https://jickcai.iteye.com/blog/2539593"
---

echo aaa | awk '{print "select * from A where name='\\''TOM'\\''"}'

 

 

/home/work/text.txt | awk -F "\\t" '{

id=$1

sql="update table set review\_status=2,sub\_type=92,batch\_id='\\'''\\'' where sub\_type=94 and id='\\''"id"'\\'';"

 

print sql

}

&lt;iframe style="display: none !important;" width="320" height="240"&gt;&lt;/iframe&gt;

&lt;iframe style="display: none !important;" width="320" height="240"&gt;&lt;/iframe&gt;