File: strip-comments.sh

package info (click to toggle)
ttfautohint 1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,504 kB
  • ctags: 4,347
  • sloc: ansic: 38,386; sh: 5,749; cpp: 4,131; perl: 340; makefile: 309; sed: 39
file content (18 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/sh
#
# strip-comments.sh <file1> <file2> ... > result
#
# This simple script strips off all HTML comments except in the first file.

cat $1

shift

while [ $# -gt 0 ]; do
  cat $1 \
  | sed -e '/<!--.*-->/d' \
        -e '/<!--/,/-->/d'
  shift
done

# eof