echo 1234567890 > File # 写字符串到"File".
exec 3<> File # 打开"File"并且给它分配fd 3.
read -n 4 <&3 # 只读4个字符.
echo -n . >&3 # 写一个小数点.
exec 3>&- # 关闭fd 3.
cat File # ==> 1234.67890
http://blog.163.com/xjming487@126/blog/static/212951352009101984030123/