当前位置:网站首页>Shell: operator

Shell: operator

2022-07-05 23:01:00 NoGame_ NoWork

| Operator

Pipe symbol , The symbol is a vertical line : | .
usage :

command1 | command2

His function is to put the first command command 1 The result of execution is as command2 The input is passed to command 2

for example :

echo "aa bb cc" | awk -F '{print $1}' 
echo "aa bb cc" | awk -F '{print $2}' 
echo "aa bb cc" | awk -F '{print $3}' 

Output is :

aa
bb
cc

原网站

版权声明
本文为[NoGame_ NoWork]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140347410582.html