Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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