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: Pierre Gaston
Subject: Re: [Help-bash] xtrace output order
Date: Fri, 27 Sep 2013 17:02:12 +0300




On Fri, Sep 27, 2013 at 2:48 PM, Bob Hope <address@hidden> wrote:
Hello,

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  -

One a single core VM I get the output above. On a multi-core physical machine, it's the other way round. The md5sum output remains the same, just the order of lines beginning "+" differs.

Thanks.

All the commands are executed at the same time, there is no order


reply via email to

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