Daily Archives: November 4, 2010

BASH: Split a string without cut or awk

More easy than using cut or awk, bash itself provides some useful string functions: #!/bin/bash line=”1234:Some more Text…” NUMMER=${line%:*} TEXT=${line#*:} echo $NUMMER echo $TEXT Thx to: http://www.antonolsen.com/2006/04/10/bash-split-a-strin… Continue reading

Posted in Uncategorized | Leave a comment