It is possible to split the filename and extension in KSH? If so, how?
I have a script called test.ksh
in the script I have:
echo $0
The $0 returns "test.ksh"
But how can I get just the item, as a variable, to the left of the "." while retaining the contents of the item to the right of the "." in a variable.
In Perl, it can be done with:
($filename, $file_ext) = split/\./,$original_file;
But how could/would I do this in KSH?
Any assistance would greatly be appreciated.
I have a script called test.ksh
in the script I have:
echo $0
The $0 returns "test.ksh"
But how can I get just the item, as a variable, to the left of the "." while retaining the contents of the item to the right of the "." in a variable.
In Perl, it can be done with:
($filename, $file_ext) = split/\./,$original_file;
But how could/would I do this in KSH?
Any assistance would greatly be appreciated.