Friday, August 10, 2007

ls to twiki text

The following is useful when writing twiki documentation on a load of files in a directory:

ls ../PHEDEX/Toolkit/Transfer/|awk '{for (i = 1; i <= 1; i++) print "---++ " $i}'

It will print each file in the directory as a heading for the twiki page. Change as appropriate, for example:

ls ../PHEDEX/Toolkit/Transfer/|awk '{for (i = 1; i <= 1; i++) print " i " $i}'
ls ../PHEDEX/Toolkit/Transfer/|awk '{for (i = 1; i <= 1; i++) print " * " $i}'


makes lists.

No comments: