lish is a set of tools for semi literate shell scripts after the fashion of richard bird. while not fully literate in the sense of donald knuth it should suffice in most cases. if you ever find that full grown literate programming tools are what you need for the job at hand, maybe you should reconsider implementing it as a shell script.
lish consists of the following components
the main constraint on a literate shell script is that each line of code begins with > , that is a > in the first column and an empty space in the second. code segments should be preceeded and follwed by an empty line.
the files first line should be #!/pathto/lish.
have a look at the README file.
there is a man page.
lish is free and open source. get the tarball.