|
|
|
|
|
by zzzcpan
2171 days 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"
|
|