summaryrefslogtreecommitdiff
path: root/mounted
diff options
context:
space:
mode:
Diffstat (limited to 'mounted')
-rwxr-xr-xmounted31
1 files changed, 31 insertions, 0 deletions
diff --git a/mounted b/mounted
new file mode 100755
index 0000000..3899b79
--- /dev/null
+++ b/mounted
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -o pipefail
+
+mounts="$(mount | grep "\(^/dev/\)\|\(ncpfs\)\|\(fuse.sshfs\)" | grep -v '\s/mnt/key\s')"
+lines=$(echo "${mounts}" | wc -l)
+
+for (( i=1; i<=${lines}; i++))
+do
+ mount="$(echo "${mounts}" | head -n$i | tail -n1)"
+ dev="$(echo "${mount}" | awk '{print $1}')"
+ mp="$(echo "${mount}" | awk '{print $3}')"
+ case "${mp}" in
+ "/mnt/windows" ) mpa="win" ;;
+ "/mnt/141.35.60.68_home_simulation" ) mpa="smh" ;;
+ "/mnt/141.35.60.68_home_experiment" ) mpa="exh" ;;
+ "/mnt/141.35.60.68_home_expshhg" ) mpa="esh" ;;
+ "/mnt/141.35.60.68_home_erich" ) mpa="seh" ;;
+ "/mnt/141.35.50.159_home" ) mpa="nse" ;;
+ "/mnt/141.35.51.219_expshhg" ) mpa="jes" ;;
+ "/mnt/141.35.60.68" ) mpa="sim" ;;
+ "/mnt/192.168.0.12" ) mpa="hom" ;;
+ * ) mpa="${mp}" ;;
+ esac
+ if [ "${mp}" == "/" ] || df -a | grep -q "^${dev} "
+ then
+ echo " ${mpa} \$color\${fs_used ${mp}}/\${fs_size ${mp}} \${fs_bar 6 ${mp}}"
+ else
+ echo " ${dev} -> ${mp}"
+ fi
+done