$ cat --number test.sh
1 #!/bin/dash
2 set -eux;
3
4 A=~/.profile;
5 readonly B=~/.profile;
6 readonly C="${HOME}/.profile";
7 D=~/.profile;
8 readonly D;
9
10 ls "${A}" "${B}" "${C}" "${D}";
11 exit 0;
$ ./test.sh
+ A=/home/u00/.profile
+ readonly B=~/.profile
+ readonly C=/home/u00/.profile
+ D=/home/u00/.profile
+ readonly D
+ ls /home/u00/.profile ~/.profile /home/u00/.profile /home/u00/.profile
ls: cannot access ~/.profile: No such file or directory
/home/u00/.profile /home/u00/.profile /home/u00/.profile