I have file name like "FAI_4O57A" which has always three alphabets followed by underscore and than variable length digits from 1-7 (lenght) followed by single Alphabet.
I want to extract the first four characters and than replace the other digits with my own numbers like 000001 than 000002 and so on. (To auto number the file names.).
How to do this using awk. or sed. Any help will be appreciated. Thanks.