One single tool with several GUI dialogs, e.g. messagebox, file dialog, string input or choice list.
Usage example for a bash script, see more on page
:
#!/bin/sh
mkdir -p /tmp/backup/latest
fn=$(ao6dialogs file -title="choose file to back up" -folder="/")
if [ -f "$fn" ]; then
cp "$fn" /tmp/backup/latest
ao6dialogs info -text="$fn"$'\n\nhas been saved to /tmp/backup/latest.'
fi
# create backup folder
# ask user for a file
# if file exists and not cancelled:
# copy file to backup
# tell user about success
#scriptdialogs example: Ask for a file and save it to backup folder.
mkdir -p /tmp/backup/latest
fn=$(./scriptdialogs file -title="choose file for backup" -folder="/")
if [ -f "$fn" ]; then
cp "$fn" /tmp/backup/latest
echo "$fn has been saved to backup."
./scriptdialogs info -text="$fn"$'\nhas been saved to backup.'
fi