2019-05-10 11:17:57 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#storing STDOUT, then coming back to it
|
|
|
|
|
|
|
|
exec 3>&1
|
2019-10-10 08:56:31 +08:00
|
|
|
exec 1> test
|
2019-05-10 11:17:57 +08:00
|
|
|
|
|
|
|
echo "This should store in output file"
|
|
|
|
echo "along with this line"
|
|
|
|
|
|
|
|
exec 1>&3
|
|
|
|
|
|
|
|
echo "Now things should be back to normal"
|