Skip to content

Instantly share code, notes, and snippets.

@mattexdee
Created May 9, 2020 21:47
Show Gist options
  • Save mattexdee/8162152df145d6b66141d1dfedb4c529 to your computer and use it in GitHub Desktop.
Save mattexdee/8162152df145d6b66141d1dfedb4c529 to your computer and use it in GitHub Desktop.
This code will add all of the files in a directory to an objects.txt file with quotation marks at the beginning and end with a comma.
cd your/directory/path/here
printf '"%s",\n' * > objects.txt
NOTE: There are single quotes before the double quotes in %s. All spaced out these are the characters: ' " % s " , \ n '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment