shell 从文件中读取一行,并提取一行中各个字符串
(2015-07-23 17:00:23)
标签:
it |
分类: linux-shell |
info.txt 内容
416 240 8
416 240 8
==================================
read line < info.txt
#echo $line
width=`echo $line | cut -d' ' -f1`
height=`echo $line | cut -d' ' -f2`
bitdepth=`echo $line | cut -d' ' -f3`
=====================================
前一篇:量价分析之经验谈(转)
后一篇:shell——tr的用法