2 ms·
Right, it's a bit useless trick. I guess the author is just exploring how to organize help, maybe thinking about larger scripts or maybe doing it for the articl
by zzzcpan 6y ago
Right, it's a bit useless trick. I guess the author is just exploring how to organize help, maybe thinking about larger scripts or maybe doing it for the article. Either way it's hard to see it going anywhere with sed. If you were to explore parsing and organizing help, I'd suggest starting with a simple pure shell loop like this:
while read -r line; do
case "$line" in
"###"*)
echo "${line#\###}" ;;
esac
done <"$0"