read

发布时间: 更新时间: 总字数:76 阅读时间:1m 作者: IP上海 分享 网址

Linux的read是一个强大的内置工具,用于从命令行或文件读取数据,并支持对字符串进行字段分隔

使用

# echo a b c > /tmp/tmp.txt
# read p1 p2 p3 < /tmp/tmp.txt
# echo $p1
a
# echo $p2
b
# echo $p3
c
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数