sed command for substring operation

Hi All,

Input=abcDEF_1.6k1
I need to use �sed' command to get 1.6 value and store to some variable from the given input.

Please help me in getting the command.

Regards,
Kalai

Why do you need sed? The shell can do it without an external command:

Input=abcDEF_1.6k1
temp=${Input#*_}
newval=${temp%[!0-9.]*}

Thanks :slight_smile: