Tim, >I am trying to do the following in a bash script: You need a copy of the Advanced Bash-Scripting Guide http://www.tldp.org/LDP/abs/html/ derek -- Derek M Jones tel: +44 (0) 1252 520 667 Knowledge Software Ltd mailto:derek at knosof.co.uk Applications Standards Conformance Testing http://www.knosof.co.uk