help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] xtrace output order


From: Greg Wooledge
Subject: Re: [Help-bash] xtrace output order
Date: Fri, 27 Sep 2013 10:04:53 -0400
User-agent: Mutt/1.4.2.3i

On Fri, Sep 27, 2013 at 01:48:13PM +0200, Bob Hope wrote:
> Should the output of set -x in a bash script be the same as the order it is 
> executed in?
> 
> # cat b.sh
> #!/bin/bash
> /usr/bin/tail -n 100 messages | /bin/grep blah | md5sum
> 
> # bash -x b.sh
> + md5sum
> + /bin/grep blah
> + /usr/bin/tail -n 100 messages
> d41d8cd98f00b204e9800998ecf8427e -

They're all executed simultaneously.  Which one you happen to see first
in the trace output is the result of a race condition, and therefore not
predictable.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]