I'm new to shell scripting and wanted to insure I haven't made any errors in creating this script for making a borg backup to a flashdrive that I plug into my computer.
Does the below script look solid? (I made it executable and put it in my
/usr/local/bin/)I added the "date" command substitution within the "borg" command substitution. Is this allowed? Are there any rules that frown on putting command substitutions within command substitutions?
Does the entire line need quotes (") around it, like I have done?
#!/bin/bash
echo "$(borg create /media/$USER/Flashdrive/backup::$(date +%FT%H%M) /home/$USER/Documents)"