code / bb

Lines2.7K C1.8K Shell331 YAML273 Markdown197 make44
(5 lines)
1 #!/bin/sh
2 # Display text from the current line upward (instead of downward)
3 input="$(cat)"
4 printf "\\033[$(echo "$input" | wc -l)A\\033[J" >/dev/tty
5 echo "$input"