3 ms·
i just discovered some awesome tools in the moreutils package mentioned elsewhere in this discussion: sponge: soaks up stdin, so you can pipe it back to the sa
by em-bee 8y ago
i just discovered some awesome tools in the moreutils package mentioned elsewhere in this discussion:
sponge: soaks up stdin, so you can pipe it back to the same file you just read. compare:
grep -v "^me:" /etc/passwd > /etc/passwd # failed attempt to remove user *me*.
grep -v "^me:" /etc/passwd | sponge /etc/passwd # this works because sponge will wait until the grep is completed before writing back to the file.
another is:
vipe: insert vi into a pipe to do some manual editing of the data while it's handled in a pipe. could also be useful to preview pipe contents while they are being processed.
moreutils also includes vidir, an alternative to qmv.
greetings, eMBee.