top | item 44590011

(no title)

jauco | 7 months ago

I rarely use the exact samme command multiple times. But here are some bash pipe segments I enjoy.

using pv (pipeviewer) instead of cat to get a progress bar when grepping huge files.

Using httpie instead of curl so I can remember the flags.

The power of find -exec to run commands on a lot of specific files. The nice part is you can run it without exec first to see if you have the right set of files.

If you do a loop you can echo -e “$somevar\r” and then each write will overwrite the previous line so you screen doesn’t fill up but you do get a feel for the progress (to make it nice you need to pad with spaces, google for echo carriage return to learn more)

discuss

order

rajkumarsekar|7 months ago

Some great power tips here, especially love the pv + grep combo for big files.

scrapheap|7 months ago

Find's -exec option is great when you need to automate removing old backups