lumini_p30_control/tools/html2string.sh

13 lines
368 B
Bash
Executable file

#!/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'