shell script to batch-create files and add content from list
I've recently started creating a full library of Bootstrap 3 snippets for Brackets, and to accomplish the glyphicon lib with relative ease I generated a list of all glyphicon names (copy/pasted from the website) and used the shellscript below to go through the list and generate .snippet files with their respective snippet content.
#!/bin/bash
cat names.txt | while read name
do
filename=glyph-${name}.snippet
echo "<span class=\"glyphicon glyphicon-${name}\"></span>" >> ${filename}
done
https://github.com/adamellsworth/brackets-bootstrap3-snippets
Written by Adam
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Bootstrap
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#