[awk] Pick up the field which I want
Question :
Files happy/stack/include/types.h and happy_build/stack/include/types.h differ
Solution :
awk '{print $2;}' compare_part4.txt # print column 2 of the line
awk -F"/" '{$NF=""; print $0}' # Don't print the last column of the line
sed 's! !/!g' # Replace all of the space to slash
awk '{print $2;}' compare_part4.txt | awk -F"/" '{$NF=""; print $0}' | sed 's! !/!g'
Result :
atheros/offload_stack/include/
2013年4月14日 星期日
訂閱:
張貼留言 (Atom)
0 意見:
張貼留言