File: shellhtml

package info (click to toggle)
libnumbertext 1.0.11-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,380 kB
  • sloc: python: 439; cpp: 395; java: 244; javascript: 108; makefile: 101; xml: 84; sh: 40
file content (8 lines) | stat: -rwxr-xr-x 344 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
#!/bin/bash
# HTML shell preprocessor
# syntax: shell code in a HTML comment with leading exclamation mark 
# (in a new line, without leading and trailing whitespaces)
# will be executed by the shell, and the result replaced with it.
# For example, insert calendar:
# <!--!cal-->
awk '/^<!--!/{system(substr($0,6,length($0)-8)); next}{print}'