|| @iamidly
-- a blog about sham, unix and software design. also i rant.

write

write writes a single asv row entry. used in conjuction with read.

#!/usr/bin/env sham
( write #a    #b
  write  foo   bar
  write  boo   far
  write  bao   for
  write  bar   foo
) | ./into-html-table
@iamidly> sham /tmp/EXAMPLE_CODE_0_
#a#b
foobar
boofar
baofor
barfoo

is the same as this declaration:

#!/usr/bin/env sham
let data = [  #a    #b
           ;   foo   bar
           ;   boo   far
           ;   bao   for
           ;   bar   foo
           ]

./into-html-table <: $data
@iamidly> sham /tmp/EXAMPLE_CODE_1_
#a#b
foobar
boofar
baofor
barfoo

we can use write to append to an existing table:

#!/usr/bin/env sham
let data = [  #a    #b
           ;   foo   bar
           ;   boo   far
           ]

write additional value >> $data

./into-html-table <: $data
@iamidly> sham /tmp/EXAMPLE_CODE_2_
#a#b
foobar
boofar
additionalvalue
|| come join me at #sham on irc.snoonet.net
</post>