这是文本文件:
pod install
这是shell脚本:
3 rootdbs 486348800 237475 879482880 429435 1626.7
这是运行中的输出:
#!/bin/bash
# date:2019-02-02
# informix Show prcdy clues.
LANG=EN
pathfile='/tmp'
check=`cat $pathfile/iof.txt|wc -l`
if [ $check -eq 0 ];then
echo "No query results"
exit 1
fi
gfd=($(cat $pathfile/iof.txt |awk '{print $1 }'))
pathname=($(cat $pathfile/iof.txt |awk '{print $2}'))
bytes_read=($(cat $pathfile/iof.txt |awk '{print $3}'))
page_reads=($(cat $pathfile/iof.txt |awk '{print $4}'))
bytes_write=($(cat $pathfile/iof.txt |awk '{print $5}'))
page_writes=($(cat $pathfile/iof.txt |awk '{print $6}'))
io_s=($(cat $pathfile/iof.txt |awk '{print $7}'))
printf '\t[\n'
printf '\t\t{\n'
printf "\t\t\t \"gfd\":\"${gfd}\",\"pathname\":\"${pathname}\",\"bytes_read\":\"${bytes_read}\",\"page_reads\":\"${page_reads}\",\"bytes_write\":\"${bytes_write}\",\"page_writes\":\"${page_writes}\",\"io/s\":\"${io_s}\"}\n"
printf "\t]\n"
最后一个键值格式错误。