function for copy files with progress bar (using pv – pipe viewer)

2010-11-11 1 min read bash Linux
function for copy files with progress bar (using pv – pipe viewer) 1 <td> <div class="text codecolorer"> &nbsp;cp_p() { if [ `echo "$2" | grep ".*/$"` ]; then pv "$1" > "$2""$1"; else pv "$1" > "$2"/"$1"; fi; } </div> </td> </tr> dont have to type new file name (it copy file under same name) and dont have to use ‘/’ in the end of destination folder (but you can if u want, its idiot proof) Continue reading