TODO: finish sh_read to implement export