I'm writing a bash script where I need to print out the content of Available
in /home
. So in the below example, it would be 458G
. I was thinking maybe I can use grep
or awk
and then print $3
or something like that? I'd appreciate the help here! I'm new to bash script.
**Filesystem 1G-blocks Used Available Use% Mounted on**
/dev/mapper/cl-root 50G 28G 23G 55% /
devtmpfs 48G 0G 48G 0% /dev
tmpfs 48G 1G 48G 1% /dev/shm
tmpfs 48G 1G 47G 1% /run
tmpfs 48G 0G 48G 0% /sys/fs/cgroup
/dev/sda2 1G 1G 1G 45% /boot
/dev/sda1 1G 1G 1G 5% /boot/efi
/dev/mapper/cl-home 492G 34G 458G 7% /home
tmpfs 10G 1G 10G 1% /run/user/1000