Date: Sun, 2 Mar 1997 13:07:08 +0200 (IST) From: Eli Zaretskii To: Bill Currie cc: djgpp AT delorie DOT com Subject: Re: bash script debugging In-Reply-To: <331667D1.4F27@blackmagic.tait.co.nz> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 28 Feb 1997, Bill Currie wrote: > How would I debug a shell script (I'm using bash (the exe is dated 30 > Dec 96)). First, get a newer version from Daisuke Aoyama's home page (the address should be in the README files). Many bugs have been fixed since the initial release. Second, to debug a shell script, put a line like this at the beginning of the script: set -x I suggest you run such scripts with redirected stdout and stderr, or catch them with an editor that can compile from within it. Third, install the following packages, and many of the problems will go away: - Make 3.75 - fileutils - textutils - sh-utils - grep - sed - gawk - diffutils Also, make a ``symlink'' to bash.exe called sh.exe and a ``symlink'' to gawk.exe called awk.exe: ln -s bash.exe sh.exe ln -s gawk.exe awk.exe (`ln' is part of fileutils).