0

Example :

./script >> log.txt

log.txt content :

1 - 2 - 3 _ 4/ 8
a - b , c - d/ 9

Before appending to file, I would like to extract the last number and then log it to the file.

log.txt new content should have :

8
9
fashuai
  • 1
  • 3

0 Answers0