How to delete or get the number in the tail from a string in shell script?

How to delete or get the number in the tail from a string in shell script (bash script)? Okay to call other tools.

For example, from "/dev/sda8", I want to get "/dev/sda" and "8" separately.

asked Jun 1, 2017 by anonymous

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...