code-snippets/shell/lsblkmounter.sh

14 lines
201 B
Bash

#!/bin/bash
lsblk
echo ""
if [ ! -z $1 ]
then
mkdir -p ~/Mounts
mkdir -p ~/Mounts/$1
sudo mount /dev/$1 ~/Mounts/$1
else
echo ""
echo "Input 'NAME' to mount in ~/Mounts/'NAME'"
fi