I have multiple files named beaster#, which contain a line in them like :
@SET LOGFILE=("/home/bham_mta/rehome_scripts/cmd_file1"
I want to replace the text "cmd_file1" with file#
File# being the numeric digit from the name of this file "beaster1". So the text would end up file1, and the next file2, file3, and so on.
Since I never know how many beaster files there will be, it would need to loop until it has gone through all the files that may be in the directory that are labeled beaster#
Like:
beaster1
beaster2
beaster3
beaster4
would all have the text "cmd_file1" changed to:
@SET LOGFILE=("/home/bham_mta/rehome_scripts/file1"
@SET LOGFILE=("/home/bham_mta/rehome_scripts/file2"
@SET LOGFILE=("/home/bham_mta/rehome_scripts/file3"
@SET LOGFILE=("/home/bham_mta/rehome_scripts/file4"
I hope this hasn't been confusing.
Thanks as always,
Beaster
@SET LOGFILE=("/home/bham_mta/rehome_scripts/cmd_file1"
I want to replace the text "cmd_file1" with file#
File# being the numeric digit from the name of this file "beaster1". So the text would end up file1, and the next file2, file3, and so on.
Since I never know how many beaster files there will be, it would need to loop until it has gone through all the files that may be in the directory that are labeled beaster#
Like:
beaster1
beaster2
beaster3
beaster4
would all have the text "cmd_file1" changed to:
@SET LOGFILE=("/home/bham_mta/rehome_scripts/file1"
@SET LOGFILE=("/home/bham_mta/rehome_scripts/file2"
@SET LOGFILE=("/home/bham_mta/rehome_scripts/file3"
@SET LOGFILE=("/home/bham_mta/rehome_scripts/file4"
I hope this hasn't been confusing.
Thanks as always,
Beaster