Skip to content

Instantly share code, notes, and snippets.

@jarretgabel
Created June 6, 2012 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarretgabel/2885311 to your computer and use it in GitHub Desktop.
Save jarretgabel/2885311 to your computer and use it in GitHub Desktop.
Takes a txt file with a list and adds quotes before and after each line with a comma seperator
#!/bin/bash
echo -n "Enter target filename and press [ENTER]: "
read target
echo -n "Enter destination filename and press [ENTER]: "
read destination
touch $destination
echo -e "" > $destination
while read line
do
echo -e \"$line\"\, >> $destination;
done < $target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment