- #!/usr/bin/env bash
- set -euo pipefail # bash strict mode
- dir="$1"
- name="$2"
- list="/tmp/watched_movies.txt"
- tmp="${list}.temp"
- echo "$name" >> "$temp"
- cat "$temp" | sort | uniq > "$list"
- # mv "$dir" /media/zadca123/Elements/movies/watched
- # directory="${1%/*}/watched" && \
- # mkdir -p "$directory" && \
- # mv "$1" "$directory" && \
- # notify-send "moved"
|