From: David Sterba <dsterba@suse.cz>
To: Jan Tulak <jtulak@redhat.com>
Cc: eguan@redhat.com, fstests@vger.kernel.org, lczerner@redhat.com
Subject: Re: [PATCH] fstests: Tests can use any name now, not 3 digits only.
Date: Thu, 26 Mar 2015 16:44:11 +0100 [thread overview]
Message-ID: <20150326154411.GQ20767@suse.cz> (raw)
In-Reply-To: <1912769466.3218422.1427382962269.JavaMail.zimbra@redhat.com>
On Thu, Mar 26, 2015 at 11:16:02AM -0400, Jan Tulak wrote:
> > > + for found in `tail -n +$line $tdir/group | $AWK_PROG '{ print $1 }'`; do
> > > + foundId=$(echo "$found" | tr - ' ' | $AWK_PROG '{ print $1 }')
> > > + line=$((line+1))
> > > + if [ -z "$found" ] || [ "$found" == "#" ]; then
> > > + continue
> > > + elif [[ "$found" > "$name" ]] || [ "$foundId" -gt "$id" ]; then
> >
> > Bash guide advices not to use [[ ]] for arithmetic expressions, in favor
> > of (( )). Besides, I find mixing [[ ]] and [ ] inconsistent, choose one.
>
> The [[ "$found" > "$name" ]] is a string expression, for lexicographic ordering. :-)
Ah, I see, then it's correct.
> The second [ ] is for arithmetic - so I used the mix of [[]] and []
> deliberately to distinguish it. Though if it is a bad practise, I will
> stick to not mixing it in one condition.
And [ -gt ] is ok.
next prev parent reply other threads:[~2015-03-26 15:44 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 15:55 [PATCH] Tests can use any name now, not 3 digits only Jan Ťulák
2015-03-18 18:01 ` Jan Tulak
2015-03-20 11:13 ` Eryu Guan
2015-03-20 15:03 ` [PATCH] fstests: tests " Jan Ťulák
2015-03-21 4:49 ` Eryu Guan
2015-03-21 12:02 ` Jan Tulak
2015-03-21 13:11 ` Eryu Guan
2015-03-25 13:27 ` [PATCH] fstests: Tests " Jan Ťulák
2015-03-25 13:32 ` Jan Tulak
2015-03-25 14:44 ` David Sterba
2015-03-25 15:20 ` Lukáš Czerner
2015-03-25 15:27 ` Jan Tulak
2015-03-25 15:43 ` Lukáš Czerner
2015-03-26 13:32 ` Jan Tulak
2015-03-25 17:09 ` Eryu Guan
2015-03-25 17:39 ` Jan Tulak
2015-03-26 13:35 ` Jan Ťulák
2015-03-26 14:41 ` David Sterba
2015-03-26 15:16 ` Jan Tulak
2015-03-26 15:44 ` David Sterba [this message]
2015-03-26 15:33 ` [PATCH v6] " Jan Ťulák
2015-03-27 7:25 ` Eryu Guan
2015-03-27 9:15 ` Jan Tulak
2015-03-27 9:19 ` Eryu Guan
2015-03-27 9:15 ` [PATCH v7] " Jan Ťulák
2015-03-27 9:39 ` Eryu Guan
2015-03-27 9:48 ` Jan Tulak
2015-03-27 11:15 ` Eryu Guan
2015-03-27 11:30 ` Jan Tulak
2015-03-27 11:29 ` [PATCH v8] " Jan Ťulák
2015-03-27 11:49 ` [PATCH v9] " Jan Ťulák
2015-03-27 14:33 ` Eryu Guan
2015-03-30 13:44 ` David Sterba
2015-04-01 4:35 ` Dave Chinner
2015-04-01 12:09 ` Jan Tulak
2015-04-01 12:15 ` Lukáš Czerner
2015-04-01 13:17 ` [PATCH v10] " Jan Ťulák
2015-03-20 15:04 ` [PATCH] " Jan Tulak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150326154411.GQ20767@suse.cz \
--to=dsterba@suse.cz \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=jtulak@redhat.com \
--cc=lczerner@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.