extracting substring at bash
June 28th, 2007 mysurface
Extracting sub string at Bash is very easy, let say you have a phone number 012-4567890 and you just wanna extract 4567890 out, you can do as below. num=”016-4567890″; echo ${num:5:7} 5 is the starting point and 7 is the string length for sub string. Related Poststar normal operationI am here to show you examples [...]
Posted in Bash, Text Manipulation | Hits: 122597 | 14 Comments »






