mirror of
https://github.com/dunwu/linux-tutorial.git
synced 2024-04-15 19:55:24 +08:00
14 lines
201 B
Bash
14 lines
201 B
Bash
#!/bin/bash
|
|
|
|
#storing STDOUT, then coming back to it
|
|
|
|
exec 3>&1
|
|
exec 1> test
|
|
|
|
echo "This should store in output file"
|
|
echo "along with this line"
|
|
|
|
exec 1>&3
|
|
|
|
echo "Now things should be back to normal"
|