std redirect

This commit is contained in:
Kolan Sh 2011-07-08 23:02:41 +04:00
parent 6cf54711b9
commit d3a61ea47c
2 changed files with 8 additions and 0 deletions

4
bash/stdredirect/print.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
echo stdout
echo stderr >&2

4
bash/stdredirect/redirect.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
exec 3>&1
./print.sh 2>&1 1>&3 | sed 's~std~std_changed~'