the create_thought_container:

#! /bin/sh

cd ~
cd srctemp/blog

# https://stackoverflow.com/questions/2559076/how-do-i-redirect-output-to-a-variable-in-shell/2559087#2559087
hash=$(env LC_CTYPE=C tr -dc A-Za-z0-9 < /dev/urandom | head -c8) && echo $hash
createmessage=$(bundle exec jekyll post $hash)
# echo $createmessage
# https://superuser.com/questions/697667/command-line-extract-substring-from-output/697669#697669
dirtypath=$(echo $createmessage | cut -d ' ' -f 8)
# echo "dirtypath: " $dirtypath
# https://unix.stackexchange.com/questions/83038/remove-last-character-from-line/83040#83040
cleanpath=$(echo $dirtypath | sed 's/.$//')
# echo "cleanpath: " $cleanpath
echo "\ntype: thought_bubble" >> $cleanpath
echo "\n" >> $cleanpath
open $cleanpath

Your Name

Fabian Fabian is an Interaction Designer at Costa Digital. He is a speaker at international conferences, an avid sketchnoter, and co-founder of community events like the UX Camp Hamburg, Github from Scratch or the Agile Design Camp.

 twitter/filtercake
 github/filtercake
flickr/filtercake
slidr/filtercake


Published