[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] `set -v` difference in () vs not in ()
From: |
Peng Yu |
Subject: |
[Help-bash] `set -v` difference in () vs not in () |
Date: |
Sat, 9 Jun 2018 17:32:23 -0500 |
Hi,
-v Print shell input lines as they are read.
`set -v` behave differently whether it is in () or not. It seems that
is not documented. Why is it defined so?
$ cat ./main.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:
(
set -v
echo "Hello World!"
)
set -v
echo "Hello World!"
$ ./main.sh
Hello World!
echo "Hello World!"
Hello World!
--
Regards,
Peng
- [Help-bash] `set -v` difference in () vs not in (),
Peng Yu <=