How to Use AWK in Bash Scripting Posted on 2014-01-03 In Linux , Shell Script Disqus: Symbols count in article: 296 Reading time ≈ 1 mins. How to Use AWK in Bash ScriptingCommandline: 1lxc-info -n containerName -s | awk '{print $2}' Bash scripting: 1234rt="$(lxc-info -n containerName -s | awk '{print $2}')"if [ $rt = "RUNNING" ]; then. . .fi Reference:http://www.cyberciti.biz/faq/bash-scripting-using-awk/ Post author: Joseph Chen Post link: https://tech.jocodoma.com/2014/01/03/How-to-Use-AWK-in-Bash-Scripting/ Copyright Notice: All articles in this blog are licensed under BY-NC-SA unless stating additionally.