BTW: the LLM also instructed me to do a whole bunch of seemingly useless stuff, like giving Terminal.app full disk access via System Settings > Privacy & Security > Full Disk Access (which I assume is actually a thing in macos but can’t verify as I run linux)
edit: I hope I didn’t misinterpret the bash commands (I didn’t actually run them) and spotted the right bugs in them - even if I didn’t I guess my point still stands?
IDK.
I just asked this to perplexity as an experiment:
Here’s what it concocted:
cd ~ && find Documents -maxdepth 1 -type f -exec sh -c 'for f; do cp "$1" "Documents/$(date +%Y%m%d-%H%M%S)_$(basename "$1")"; done' _ {} +Now, I am no “prompt engineer” and surely there are better way to ask it stuff, but then again a layman is no prompt engineer either.
So the question is: would a layman be able to provide feedback and have perplexity fix its command?
My “layman-like” feedback (now that I re-read it, IDK how much a layman would have used “recurse”… I’m doing my best here):
mkdir -p ~/backups && cd ~/Documents && find . -type f -exec sh -c 'mkdir -p "~/backups/$(dirname "$1")" && cp "$1" "~/backups/$2/$(date +%Y%m%d-%H%M%S)_$(basename "$1")"' _ {} "$(pwd)" \;Feeback:
mkdir -p ~/backups && rsync -a --include='*/' --include='*.*' --exclude='*' --no-links ~/Documents/ ~/backups/"$(date +%Y%m%d-%H%M%S)"/mkdir -p ~/backups && find ~/Documents -type f -exec sh -c 'dir="~ /backups/$(dirname "${1#"$2"}")"; mkdir -p "$dir"; cp "$1" "$dir/$(date +%Y%m%d-%H%M%S)_$(basename "$1")"' _ {} ~/Documents \;I don’t think I need to continue?
BTW: the LLM also instructed me to do a whole bunch of seemingly useless stuff, like giving Terminal.app full disk access via System Settings > Privacy & Security > Full Disk Access (which I assume is actually a thing in macos but can’t verify as I run linux)
edit: I hope I didn’t misinterpret the bash commands (I didn’t actually run them) and spotted the right bugs in them - even if I didn’t I guess my point still stands?