Created
June 4, 2019 15:37
-
-
Save jamiejackson/d92750cc42442a527c6b94499a13bc79 to your computer and use it in GitHub Desktop.
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
| root@d53bce2e69a0:/# STR="My horse weighs 3000 kg but the car weighs more" | |
| root@d53bce2e69a0:/# awk -v RS=[0-9]+ '{print RT+0;exit}' <<< "$STR" | |
| 0 | |
| root@d53bce2e69a0:/# echo $RT | |
| root@d53bce2e69a0:/# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment