Skip to content

Instantly share code, notes, and snippets.

@naohaq
Created May 14, 2015 04:00
Show Gist options
  • Save naohaq/d5f63773e7a73db0e727 to your computer and use it in GitHub Desktop.
Save naohaq/d5f63773e7a73db0e727 to your computer and use it in GitHub Desktop.
Sum of 1 to 10
#!/bin/sh
cnt=`mktemp`
acc=`mktemp`
for c in a b c d e f g h i j ; do
echo -n $c >> $cnt ; cat $cnt >> $acc
done
wc -c < $acc
rm -f $cnt $acc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment