RosettaCodeData/Task/Strip-comments-from-a-string/Sed/strip-comments-from-a-string.sed

4 lines
76 B
Sed
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
#!/bin/sh
# Strip comments
echo "$1" | sed 's/ *[#;].*$//g' | sed 's/^ *//'