$ 1>filename
$ 是命令提示符 , 你光输入这肯定是空的
你输入 1 回车也 不是空的吗..
ls > filename
就是把 ls 命令的输入冲定向到 文件 filename 里面.
输出重定向echo "abc" > file1cat file1输入重定向#!/bin/shwhile read linedo echo $linedone < file1