You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone git@github.com:macie/smallstache.sh.git
cd smallstache.sh
make install
Development
Use make (GNU or BSD):
make - run checks
make test - run test
make check - perform static code analysis
make install - install in /usr/local/bin
make dist - prepare for distributing
make clean - remove distributed artifacts
make cli-release - tag latest commit as a new release
make info - print system info (useful for debugging).
Versioning
smallstache is versioned according to the scheme YY.0M.MICRO (calendar versioning). Releases are tagged in Git.
Known bugs
Argument list too long
smallstache handles limited length of key-value pairs. When you exceed
the limit, you will see an error such as:
smallstache[41]: sed: Argument list too long
As a workaround, fill template in parts with following steps:
# save key-value pairs to a few partsset>data
split -l 2000 -a 5 data data_part_
# fill the template
cp template result
forpartin data_part_*;do
smallstache result <"$part">partially_filled
cp partially_filled result
done# see the result
cat result
smallstache uses special character to separate key-value pairs in substitution
command (default: |). When value contains this character, smallstache will
throw an error similar to:
sed: -e expression #1, char 24: unknown option to `s'
In such case, you should use another character as a delimiter, for example:
smallstache -d _.