Grep for tag in XML
#!/bin/bash echo ' <version>1.0.0</version>' | grep "^ <version>.*</version>$" | awk -F'[><]' '{print $3}'