File: moo.awk

package info (click to toggle)
libcwd 1.0.4-1.1
  • links: PTS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 8,136 kB
  • ctags: 10,313
  • sloc: cpp: 23,354; sh: 9,798; ansic: 1,172; makefile: 852; exp: 234; awk: 11
file content (12 lines) | stat: -rw-r--r-- 271 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
/^<\!-- START OUTPUT .* -->$/ {
  print;
  sub(/^<\!-- START OUTPUT /,"",$0);
  sub(/ -->$/,"",$0);
  cmd=sprintf("%s 2>&1 | sed -e 's/&/\\&amp;/g' -e 's/</\\&lt;/g' -e 's/>/\\&gt;/g' -e 's/\"/\\&quot;/g' -e 's//\\&sect;/g'", $0);
  system(cmd);
  next;
}

{
  print;
}