lumini_p30_control/tools/html2string.sh

14 lines
368 B
Bash
Raw Permalink Normal View History

#!/bin/bash
# Remove leading whitespace and comments starting with //
sed -e 's/^[[:space:]]*//' -e '/^\/\/.*/d' $1 |
# Remove one line comments starting with //
sed -e 's/^\/\/.*$//' |
# Remove trailing comments starting with space //
sed -e 's/ \/\/.*$//' |
# Remove one-line comments starting with /*
sed -e 's/\/\*.*//g' |
# Remove empty lines
sed -e '/^\s*$/d'