dotfiles/bin/shp

16 lines
263 B
Plaintext
Raw Permalink Normal View History

2023-04-14 22:50:40 -05:00
#! /usr/bin/awk -f
/^[ \t]*#\$.*/ {
match($0,/^[ \t]*/)
whitespace=substr($0,RSTART,RLENGTH)
match($0,/#\$.*/)
command=substr($0,RSTART+2,RLENGTH)
while (command | getline line) print whitespace line
}
!/^[ \t]*#\$.*/ {
print $0
}