shell 编程 重定向 read

来源:互联网 发布:张靓颖求婚 知乎 编辑:程序博客网 时间:2024/06/03 21:15

#!/bin/bash

File=/etc/fstab  # File和等号中间不能空格

Result=1.test

{

   read line1

   read line 2

} < $File

{

echo "$line1"

echo "$line2"

} > $Result

原创粉丝点击