Pull Out the Numbers
Print every number in text.txt, one per line, in the order they appear. A number is a run of digits, so room 12, floor 3 holds 12 and 3.
Example 1
text.txt
room 12, floor 3 no digits here call 5551234 after 9
prints
12 3 5551234 9
Constraints
- Up to 10 lines
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Bash problems
- Rename Them AllMedium
- SquaresMedium
- Sum a ColumnMedium
- Swap Two ColumnsMedium
- The Longest LineMedium
- The Most Common WordMedium
- Busiest VisitorsHard
- Lines of CodeHard