用 echo "a.b.c" | cut -d'.' -f2 來取得 b 這個字串 echo abcdefgh | cut -c1,2 來取得前面的兩個字串 ab echo abcdefgh | cut -c 1-3 取 abc
留言