給未來的裕翔
對於aaa bbb ccc這樣的字串
如何快速擷取bbb呢?
除了echo "aaa bbb ccc" | cut -d\ -f2
我們還可以
echo "aaa bbb ccc" | awk '{print $2}'
不過仔細想想
第一個方法所需的鍵數比較少
那還是維持用第一個吧方法吧~
Showing posts with label gawk. Show all posts
Showing posts with label gawk. Show all posts
Friday, April 2, 2010
Subscribe to:
Posts (Atom)