bug-bash
[Top][All Lists]
Advanced

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

set -v doesn't take effect until next line


From: Dan Jacobson
Subject: set -v doesn't take effect until next line
Date: Sat, 28 Jun 2003 17:34:45 +0800
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

set -v doesn't take effect until next line:
$ echo cd\;who|sh -v
cd;who
jidanni  pts/0        Jun 28 01:23 (:0)
$ set -v;cd;who
jidanni  pts/0        Jun 28 01:23 (:0)
$ who
who
jidanni  pts/0        Jun 28 01:23 (:0)

No big deal perhaps, except forget about using -v in a Makefile the
easy way.
$ cat Makefile
vtest:
        echo a
        set -v;echo a
        set -x;echo a
        sh -cv 'echo a'
$ make vtest
echo a
a
set -v;echo a
a
set -x;echo a
+ echo a
a
sh -cv 'echo a'
echo a
a

same with set +v. Ok, maybe it's all line based, not ';' based.  Darn.




reply via email to

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