aboutsummaryrefslogtreecommitdiff
path: root/bin/twoman
blob: 7581ea861c01885a405730c1245954a7cc95933f (plain)
1
2
3
4
5
6
7
#!/bin/sh
# twoman CMD... - show comments at the beginning of a script
for cmd; do
	cmd=$(command -v "$cmd" 2>/dev/null)
	[ -z "$cmd" ] && continue
	sed -rn '1{/^[^#][^!]/q;d;};/^$|^[^#]/q;s/^# //p' $cmd
done