Peng Yu
2017-12-10 02:56:32 UTC
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
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
Regards,
Peng