How to extract a portion of a string from a full string using unix.
For example:
Say source string is = "req92374923.log"
I want only the numeric portion of the string say "92374923" how to do that in Unix.
How to extract a portion of a string from a full string using unix.
For example:
Say source string is = "req92374923.log"
I want only the numeric portion of the string say "92374923" how to do that in Unix.
I suppose it depends on what you are really trying to do. One way would be:
echo req92374923.log | cut -c4-11
You can also use sed, awk or possible basename.
Thanks 98_1LE
It worked fine..
Regards,
ds_sastry