1 2 3 4 5 6
#!/bin/sh # Remove all the commments in the given file # Comments are considered to start with "#" sed -i "s/\s*#.*//g; /^$/ d" $1