Created
January 12, 2016 19:59
-
-
Save ivanrosolen/7857a69122c013f6332b to your computer and use it in GitHub Desktop.
Pegar apenas um número do output (multiline) de um comando
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Output: | |
lero lero | |
lero lero | |
bla bla bla (ASSET ID: 85) time 12 | |
comando 2>&1 | sed -E 's,.+: ([0-9]+)\).+,\1,g' | tail -n1 | |
Resultado: | |
85 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment