#/bin/sh bookmark="$(xclip -o)" file="$HOME/repositories/bookmarks/bookmarks.txt" if grep -q "^$bookmark$" "$file";then notify-send "Failed" "Already bookmarked!" else notify-send "Success" "$bookmark added to the file!" echo "$bookmark" >> "$file" fi