aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/scripts/bin-xfer
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-09-05 07:48:16 +0200
committerneodarz <neodarz@neodarz.net>2019-09-05 07:48:16 +0200
commit9b19480228d8421c3987a634a602012c953a993e (patch)
tree4bce21766502f3a72bb2002daeea2a406c2a3bda /dotfiles/scripts/bin-xfer
parent40dddc15f4a323d3c84c84be7bb2c5ca94d3c07c (diff)
downloaddotfiles_dotdrop-9b19480228d8421c3987a634a602012c953a993e.tar.xz
dotfiles_dotdrop-9b19480228d8421c3987a634a602012c953a993e.zip
Add some scripts
Diffstat (limited to 'dotfiles/scripts/bin-xfer')
-rwxr-xr-xdotfiles/scripts/bin-xfer36
1 files changed, 36 insertions, 0 deletions
diff --git a/dotfiles/scripts/bin-xfer b/dotfiles/scripts/bin-xfer
new file mode 100755
index 0000000..e2ccce5
--- /dev/null
+++ b/dotfiles/scripts/bin-xfer
@@ -0,0 +1,36 @@
+#!/bin/sh
+INFILE=/dev/null
+OUTFILE=/dev/null
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -i)
+ shift
+ INFILE="$1"
+ ;;
+ -o)
+ shift
+ OUTFILE="$1"
+ ;;
+ -h|--help)
+ echo "$0 -i infile -o outfile"
+ ;;
+ *)
+ INFILE="$1"
+ esac
+ shift
+done
+cat << EOF
+binary-xfer utility for minicom
+Sending file ${INFILE} to ${OUTFILE}
+EOF
+
+/usr/bin/pv --force -i 0.25 -B 128 ${INFILE} 2>&1 > ${OUTFILE}
+# Use the line below if you don't have pv!
+
+# /bin/cat ${INFILE} > ${OUTFILE}
+cat << EOF
+
+File transfer complete
+EOF
+sleep 1