dayankoven
Programmer
Hi there fellow Experts,
Was hoping someone could shed some light as to how i can achieve the below :-
I have a list of files at the specific directory for eg :-
BWCRUCNT1A
BWCRUCNT1B
BWCRUCNT1C
I need to create a UNIX .sh script that will copy the file over from this directory to a another working directory.
The problem is when copied over the files must not have the alphabet extension at the back. So, for this case the file must be copied as BWCRUCNT1. Another requirement is that i must pass in the original filename into the script. So, in short, the script must accept one parameter(original filename) and then based on this parameter it must then modify the parameter(filename) to remove the last character at the end and copy the file over to the working directory.
Appreciate all the help and thanks in advance.
Was hoping someone could shed some light as to how i can achieve the below :-
I have a list of files at the specific directory for eg :-
BWCRUCNT1A
BWCRUCNT1B
BWCRUCNT1C
I need to create a UNIX .sh script that will copy the file over from this directory to a another working directory.
The problem is when copied over the files must not have the alphabet extension at the back. So, for this case the file must be copied as BWCRUCNT1. Another requirement is that i must pass in the original filename into the script. So, in short, the script must accept one parameter(original filename) and then based on this parameter it must then modify the parameter(filename) to remove the last character at the end and copy the file over to the working directory.
Appreciate all the help and thanks in advance.