bin: add line rewrite utility
This commit is contained in:
parent
0806d4e85f
commit
d0715267f8
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
# ex - archive extractor
|
# ex - archive extractor
|
||||||
# usage: ex <file>
|
# usage: ex <file>
|
||||||
|
# depends: rewrite(in dotfiles)
|
||||||
for arg do
|
for arg do
|
||||||
if test -r "$arg"; then
|
if test -r "$arg"; then
|
||||||
path="$(realpath "$arg")"
|
path="$(realpath "$arg")"
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Pipe a command into this and each output line will rewrite the previous one
|
||||||
|
sed --unbuffered '2,$s|^|\\e[1A\\e[K|' | xargs -d '\n' -L 1 echo -e
|
Loading…
Reference in New Issue