awk中split函数的用法
time='12:34:56'
echo $time | awk '{split($0,a,":" ); print a[1]}'
12
echo $time | awk '{split($0,a,":" ); print a[3]}'
56
time='12 34 56'
echo $time | awk '{split($0,a," " ); print a[1], a[2], a[3]}'
echo $time | awk '{split($0,a," " ); for (i=1; i<=3; i++) print a[i]}'