https://www.cnblogs.com/yeungchie/
看一下原文本。
yeung@eda7 Linux ~/tmp > cat pin.list | sort Address[0] Metal3,pin 133.175:159.92 Address[1] Metal3,pin 112.38:159.92 Address[2] Metal3,pin 70.775:159.92 Address[3] Metal3,pin 41.655:159.92 DataIn[0] Metal3,pin 66.615:159.92 DataIn[1] Metal3,pin 37.495:159.92 DataIn[2] Metal3,pin 122.88:159.92 DataIn[3] Metal3,pin 95.74:159.92 DataOut[0] Metal3,pin 45.815:159.92 DataOut[1] Metal3,pin 79.095:159.92 DataOut[2] Metal3,pin 104.055:159.92 DataOut[3] Metal3,pin 62.46:159.92 MemReq Metal3,pin 108.215:159.92 RdWrBar Metal3,pin 87.415:159.92 clock Metal3,pin 74.935:159.92
指定行宽度。
yeung@eda7 Linux ~/tmp > cat pin.list | sort | column -c 80 Address[0] Metal3,pin 133.175:159.92 DataOut[0] Metal3,pin 45.815:159.92 Address[1] Metal3,pin 112.38:159.92 DataOut[1] Metal3,pin 79.095:159.92 Address[2] Metal3,pin 70.775:159.92 DataOut[2] Metal3,pin 104.055:159.92 Address[3] Metal3,pin 41.655:159.92 DataOut[3] Metal3,pin 62.46:159.92 DataIn[0] Metal3,pin 66.615:159.92 MemReq Metal3,pin 108.215:159.92 DataIn[1] Metal3,pin 37.495:159.92 RdWrBar Metal3,pin 87.415:159.92 DataIn[2] Metal3,pin 122.88:159.92 clock Metal3,pin 74.935:159.92
对齐列。
yeung@eda7 Linux ~/tmp > cat pin.list | sort | column -t Address[0] Metal3,pin 133.175:159.92 Address[1] Metal3,pin 112.38:159.92 Address[2] Metal3,pin 70.775:159.92 Address[3] Metal3,pin 41.655:159.92 DataIn[0] Metal3,pin 66.615:159.92 DataIn[1] Metal3,pin 37.495:159.92 DataIn[2] Metal3,pin 122.88:159.92 DataIn[3] Metal3,pin 95.74:159.92 DataOut[0] Metal3,pin 45.815:159.92 DataOut[1] Metal3,pin 79.095:159.92 DataOut[2] Metal3,pin 104.055:159.92 DataOut[3] Metal3,pin 62.46:159.92 MemReq Metal3,pin 108.215:159.92 RdWrBar Metal3,pin 87.415:159.92 clock Metal3,pin 74.935:159.92
指定分隔符。
yeung@eda7 Linux ~/tmp > cat pin.list | sort | column -t -s' ,:' Address[0] Metal3 pin 133.175 159.92 Address[1] Metal3 pin 112.38 159.92 Address[2] Metal3 pin 70.775 159.92 Address[3] Metal3 pin 41.655 159.92 DataIn[0] Metal3 pin 66.615 159.92 DataIn[1] Metal3 pin 37.495 159.92 DataIn[2] Metal3 pin 122.88 159.92 DataIn[3] Metal3 pin 95.74 159.92 DataOut[0] Metal3 pin 45.815 159.92 DataOut[1] Metal3 pin 79.095 159.92 DataOut[2] Metal3 pin 104.055 159.92 DataOut[3] Metal3 pin 62.46 159.92 MemReq Metal3 pin 108.215 159.92 RdWrBar Metal3 pin 87.415 159.92 clock Metal3 pin 74.935 159.92
指定符号填充。
yeung@eda7 Linux ~/tmp > cat pin.list | sort | column -t -s' ,:' -o',' Address[0],Metal3,pin,133.175,159.92 Address[1],Metal3,pin,112.38 ,159.92 Address[2],Metal3,pin,70.775 ,159.92 Address[3],Metal3,pin,41.655 ,159.92 DataIn[0] ,Metal3,pin,66.615 ,159.92 DataIn[1] ,Metal3,pin,37.495 ,159.92 DataIn[2] ,Metal3,pin,122.88 ,159.92 DataIn[3] ,Metal3,pin,95.74 ,159.92 DataOut[0],Metal3,pin,45.815 ,159.92 DataOut[1],Metal3,pin,79.095 ,159.92 DataOut[2],Metal3,pin,104.055,159.92 DataOut[3],Metal3,pin,62.46 ,159.92 MemReq ,Metal3,pin,108.215,159.92 RdWrBar ,Metal3,pin,87.415 ,159.92 clock ,Metal3,pin,74.935 ,159.92