Scripting snippets Extract Ubuntu release code using cut to split string and sed to trim text #!/bin/sh versioncode=`lsb_release -r | cut -f2 -d':' | sed -e 's/^[[:space:]]*//'`