Hi,
I want to print the command automatically with an extra + in the
front. 'set -x' can add PS4, but it print piped commands into multiple
lines. Is there a way to add '+' automatically when 'set -v' is
enabled?
/tmp$ ./test.sh
echo hello | cat
hello
set +v
+ echo hello
+ cat
hello
/tmp$ cat test.sh
#!/usr/bin/env bash
set -v
echo hello | cat
set +v
set -x
echo hello | cat
--
Regards,
Peng
[Prev in Thread]
Current Thread
[Next in Thread]
[Help-bash] set -v but with PS4 add to the front,
Peng Yu<=