| 1 | #!/bin/bash
|
|---|
| 2 | #
|
|---|
| 3 | # Odd behavior is witnessed in an OmniOS VBox guest, running under
|
|---|
| 4 | # latest VBox (5.0.10) with matching SUNWvboxguest package installed.
|
|---|
| 5 | # The same issue is present with an Oracle Solaris 11.3 guest.
|
|---|
| 6 | #
|
|---|
| 7 | # To observe this bug, run this script from two different directories:
|
|---|
| 8 | # 1. any local directory (i.e. not a VBox shared folder)
|
|---|
| 9 | # 2. with your CWD inside a VBox shared folder
|
|---|
| 10 | #
|
|---|
| 11 | # e.g., with this script saved as ~/vbbug.sh:
|
|---|
| 12 | # ./vbbug.sh
|
|---|
| 13 | # then
|
|---|
| 14 | # cd /mnt/sf_vbox-shared; ~/vbbug.sh
|
|---|
| 15 | # and observe that "some_file.txt" on the VBox shared folder
|
|---|
| 16 | # does not contain the "1" from /bin/echo
|
|---|
| 17 |
|
|---|
| 18 | {
|
|---|
| 19 | /bin/echo "1"
|
|---|
| 20 | echo "2"
|
|---|
| 21 | } > some_file.txt
|
|---|