Sysadmin > UtilitIes > AwK > EmbeddingAwkScriptInShellScript

How to embed a awk script (multiline) in a shell script

# cat hydra2login.sh
#!/bin/sh

awk=/usr/bin/awk
awkcommand='
/login/ {
print $5":"$7
}
'
$awk "$awkcommand" ./20170817-hydra-10.*