Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >
# 将tmp文件中倒数第二列提取到一个数组evl中
# 这样不行: evl=`awk '{print $(NF-1)}' tmp` 这样是把空格分割的字符串赋值给evl(且还不严格是空格分割的,用IFS方法拆分无效)
# 得加一个括号,这样转成数组
evl=(`awk '{print $(NF-1)}' tmp`)

echo -e "${evl[0]}\t${evl[1]}"

评论