Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16473
| Path | csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Eli Schwartz <eschwartz@archlinux.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: An xtrace variant |
| Date | Sun, 28 Jun 2020 15:51:37 -0400 |
| Lines | 76 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.588.1593373916.2574.bug-bash@gnu.org> (permalink) |
| References | <87h7uv0zi8.fsf@hobgoblin.ariadne.com> <be988bdb-ab91-877b-e85d-366f6fd8563e@archlinux.org> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Np6LyIS0rxuoJQlzmaEETqfiqzw03GnLQ" |
| X-Trace | usenet.stanford.edu 1593373917 2911 209.51.188.17 (28 Jun 2020 19:51:57 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| X-Spam-BL-Results | |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1593373903; bh=b1Umwat7iZRPRNejoLCH8N87W5JFwNZqULijFaSpjco=; h=Subject:To:References:From:Date:In-Reply-To; b=UvBLiPrdP46QVeegdq1gWrzWePF4VtuKBnuCPPDhBDz2P6rYnT5v6/d2TrBe71gVq GplC+qI7VTqN6dQHjxGpWNI3FgGyMVQ/AIiBgyjNswkjXmARhryu6eFk4QqcpkuX1G v/y0wh9yXp/qr3TJTDNMRT03ijdvtW4Em604xN1mwYjpcc8tCxs9Zj4Mn8+/TQtEPi X62ZKdZcHv2wIj4rI6iDBMnD1blT2L4zfoUhY2ViQPIiiXZTuWPbTxxaYSIGdNatuI oA8mLPTKLfSI0ejpd++wGIgrxDWcFDqNZRR+zrPexsaTuLeY4EjDkRT0bVK3mUXqFf O5EaYWbmWK1qz8aQ9tfOAjLgWhzPSl0wt6JwggJRy+JDhLokbn4VVxB3X9I6eNeMoT 6RNcWCOwxCck/XpJmOr0I2SgsrESjsRUBXSjqc3dak9OwSBzBBYSsjrwgYRWCPsL6K 9KMyRis/2NtJbCffH7nj59hcgiLVEke1X9ZJfXU7dHGj+F+EP8E883zywNlkXjMckZ WgytA5IPfNfP2XiXAE1uJ6FbrVaF8ZH/fDK/y3DUq1ivPtSGAEptl4iHDsJyZlPMPT udoUCxs9wUEXSmQOhk4AGl29tLlkjYLhqwDCG8xBz0Hy6+zLeC1BA5kDzUm6R/T7dK ZEf3oc/jKZQ5y40z+rwoDhAU= |
| X-Clacks-Overhead | GNU Terry Pratchett |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
| In-Reply-To | <87h7uv0zi8.fsf@hobgoblin.ariadne.com> |
| Received-SPF | pass client-ip=88.198.91.70; envelope-from=eschwartz@archlinux.org; helo=orion.archlinux.org |
| X-detected-operating-system | by eggs.gnu.org: First seen = 2020/06/28 15:51:48 |
| X-ACL-Warn | Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] |
| X-Spam_score_int | -53 |
| X-Spam_score | -5.4 |
| X-Spam_bar | ----- |
| X-Spam_report | (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN |
| X-Spam_action | no action |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <be988bdb-ab91-877b-e85d-366f6fd8563e@archlinux.org> |
| X-Mailman-Original-References | <87h7uv0zi8.fsf@hobgoblin.ariadne.com> |
| Xref | csiph.com gnu.bash.bug:16473 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On 6/28/20 3:19 PM, Dale R. Worley wrote: > When debugging a shell script, a useful command is: > > bash -x script-name > > The deficiency of this is that "-x" causes all simple commands in your > startup files to be echoed as they are executed, and often this output > is a lot longer than the output from the commands in the script. > > For a long time, I've wanted a variant of -x that only echoed the simple > commands after bash is done executing the startup files. I finally did > a test implementation, naming a new switch "-X". If it is set at the > end of the execution of the startup files, then bash sets "-x", which > causes subsequent simple commands to be echoed. Why not just run bash -x script-name without the bash -l option and without $BASH_ENV set? The first is implicitly true based on your stated command line. The second doesn't seem like a high bar to set, and it's not exactly default behavior... if you really do need $BASH_ENV can't you do the set -x at the end of that file? -- Eli Schwartz Arch Linux Bug Wrangler and Trusted User
Back to gnu.bash.bug | Previous | Next | Find similar
Re: An xtrace variant Eli Schwartz <eschwartz@archlinux.org> - 2020-06-28 15:51 -0400
csiph-web