When scripting in bash or any other shell in *NIX, while running a command that will take more than a few seconds, a progress bar is needed.
For example, copying a b
First of all bar is not the only one pipe progress meter. The other (maybe even more known) is pv (pipe viewer).
Secondly bar and pv can be used for example like this:
$ bar file1 | wc -l
$ pv file1 | wc -l
or even:
$ tail -n 100 file1 | bar | wc -l
$ tail -n 100 file1 | pv | wc -l
one useful trick if you want to make use of bar and pv in commands that are working with files given in arguments, like e.g. copy file1 file2, is to use process substitution:
$ copy <(bar file1) file2
$ copy <(pv file1) file2
Process substitution is a bash magic thing that creates temporary fifo pipe files /dev/fd/ and connect stdout from runned process (inside parenthesis) through this pipe and copy sees it just like an ordinary file (with one exception, it can only read it forwards).
Update:
bar command itself allows also for copying. After man bar:
bar --in-file /dev/rmt/1cbn --out-file \
tape-restore.tar --size 2.4g --buffer-size 64k
But process substitution is in my opinion more generic way to do it. An it uses cp program itself.