Skip to content

Instantly share code, notes, and snippets.

@Thomashighbaugh
Created July 19, 2021 20:07
Show Gist options
  • Save Thomashighbaugh/26cc6aa0d9ffe2101378e51399e5a65f to your computer and use it in GitHub Desktop.
Save Thomashighbaugh/26cc6aa0d9ffe2101378e51399e5a65f to your computer and use it in GitHub Desktop.
Responding to a Newbie Question from Reddit, I wrote out the script instead of being a jerk and having the person do it themselves with tedious instructions. Was great practice.
#!/bin/bash
echo "Path to the directory you would like to copy the names of the files to clipboard from please"
read DIR
ls $DIR > /tmp/names.txt
xclip -sel clip /tmp/names.txt
rm /tmp/names.txt
echo "Ready to Paste"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment