I used the tail command to capture the name from a file name before the ".". However, some of my files has name that looks like that (ie: abc.txt.gz). I only want abc and not abc.txt. Please advise.
Current Output
main_name = abc.txt
What I want for final output:
main_name = abc
My script is as below:
foreach xxx $filename {
puts "main_name = [file rootname [file tail $xxx]]"
}
```````