Skip to content

Instantly share code, notes, and snippets.

@kinow
Created September 23, 2015 22:22
Show Gist options
  • Save kinow/4bf02eeb5a27e3f358cd to your computer and use it in GitHub Desktop.
Save kinow/4bf02eeb5a27e3f358cd to your computer and use it in GitHub Desktop.
Linux tips

##Grep for content within XML tags

grep -oP "(?<=<bla:Username>).*?(?=</bla:Username>)" app/logs/test.curl.log

Search for strings in Jenkins jobs

for x in ls -d */; do grep -r -H "srv" ${x}/workspace >> /tmp/srv; done

List packages in SLES and origin repo

rpm -qa --qf '%-30{DISTRIBUTION} %{NAME}\n'| sort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment