repo.or.cz
/
cmdllinux.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
update repository
[cmdllinux.git]
/
bash_n_examples
/
awk
/
run-cmd2.awk
blob
00b389b0165c8f98a608d3afa3d4b85e9691b52e
1
#! /usr/bin/awk -f
2
3
BEGIN
{
4
cmd =
"echo -ne 'a
\n
b
\n
' | grep 'a'"
5
cmd
|
getline
lines
6
close
(
cmd
)
7
printf
"output: "
lines
"
\n
"
8
}