Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- fdset="3 4 5 6 7 8 9"
- data3="1"
- data4="2"
- data5="3"
- data6="4"
- data7="5"
- data8="6"
- data9="7"
- for n in $fdset; do
- eval data=\"\$data$n\"
- exec 9<<-EOF
- $( echo "$data" )
- EOF
- [ $n -eq 9 ] || eval exec "$n<&9" "9<&-"
- done
- for n in $fdset; do
- data=$( eval cat \<\&$n )
- echo "data on fd($n): $data"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement