Linux 指令篇:字串處理--expr名稱:expr ### 字串長度 shell>> expr length "this is a test" 14 ### 數(shù)字商數(shù) shell>> expr 14 % 9 5 ### 從位置處抓取字串 shell>> expr substr "this is a test" 3 5 is is ### 數(shù)字串 only the first character shell>> expr index "testforthegame" e 2 ### 字串真實重現(xiàn) shell>> expr quote thisisatestformela thisisatestformela |