I have a series of files with names which are of formpath/A_b#_c#_d#_e#.outwhere # stands for float numbers. How can I extract all of these numbers from the filename, most likely, with the help of sed?
Extracting float numbers from the filename
sed;filenames
Here's what I would do:sed -E 's/[A-Za-z_]/ /g;s/. {1,}$//;s/^ {1,}([0-9])/\1/'Example:echo A_b0.5_c0.654_d0.157_e1.6.out | sed -E 's/[A-Za-z_]/ /g;s/. {1,}$//;s/^ {1,}([0-9])/\1/'0.5  0.654  0.157  1.6Someone with higher sed skills might produce a better one.