delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/02/15:26:52

Date: Mon, 03 Mar 1997 09:17:30 +1200
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: Re: bash script debugging
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp AT delorie DOT com
Reply-to: billc AT blackmagic DOT tait DOT co DOT nz
Message-id: <3319EE6A.50EB@blackmagic.tait.co.nz>
Organization: Tait Electronics NZ
MIME-version: 1.0
References: <Pine DOT SUN DOT 3 DOT 91 DOT 970302130224 DOT 6609D-100000 AT is>

Eli Zaretskii wrote:
> 
> 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.

I THOUGHT I remembered reading some posts about newer releases.

> 
> 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.

Defininely.

> 
> Third, install the following packages, and many of the problems will go
> away:
>         - Make 3.75
>         - fileutils
>         - textutils

Ahhhh, one I didn't install (forgot about it's existence)

> 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

Figured out I needed sh.exe, but thanks for the additional tip.

> 
> (`ln' is part of fileutils).

Thank you very much for your help, Eli.

Bill
-- 
Leave others their otherness.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019