[Help-bash] Why `` in PS4='``' is reduced to empty string?
From:
Peng Yu
Subject:
[Help-bash] Why `` in PS4='``' is reduced to empty string?
Date:
Sat, 9 Dec 2017 20:56:32 -0600
Hi,
It seems that PS4 is interpreted. But this seems not documented.
Also, is it better to perserve PS4 literally without any inpretation?
$ cat main.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:
PS4='*' ./run.sh
PS4=\` ./run.sh
PS4='``' ./run.sh
$ cat run.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:
set -x
./script.sh
$ ./main.sh
*./script.sh
`./script.sh
./script.sh
--
Regards,
Peng