dayankoven
Programmer
Hi there fellow gurus...
Am trying to write a korn shell script to do some filename manipulation. Say for example, in a working directory there will be 2 files with the following names ABC_200210111035.dat and ABC_200210121035.dat. What i need to do is to scan the directory, and replace all the ABC with 1001, so that end result would be 1001200210111035.dat and 1002200210121035.dat. Do i use AWK or is there some other UNIX command that i can use. Would be very grateful if fellow forummers could highlight a sample code which does what i just mentioned. Thanks in advance.
Am trying to write a korn shell script to do some filename manipulation. Say for example, in a working directory there will be 2 files with the following names ABC_200210111035.dat and ABC_200210121035.dat. What i need to do is to scan the directory, and replace all the ABC with 1001, so that end result would be 1001200210111035.dat and 1002200210121035.dat. Do i use AWK or is there some other UNIX command that i can use. Would be very grateful if fellow forummers could highlight a sample code which does what i just mentioned. Thanks in advance.