Posts Tagged ‘manipulation’

Substrings in Bash

Posted: 17th October 2010 by Tim in Bash
Tags: , , , , , , , ,

There are a number of ways to extract parts of a string in bash. If you know the position of the substring you’re looking for, then you can use the ${string:offset[:length]} syntax. This works by providing a string, an offset (or starting position – remember that the first letter is in position 0) and, optionally, […]