substring sh code example Example: substring in shell script STR="birthday-091216-pics" SUBSTR=$(echo $STR | cut -d'-' -f 2) echo $SUBSTR