Task: Extract Filename and Extension in Bash
Task: Extract Filename and Extension in Bash: a task in Terminal-Lego-15k (Harbor dataset). Write a Bash script that correctly extracts the filename (without extension) and the file extension separately from a given file path. The script must correctly handle filenames containing multiple …
The task
Write a Bash script that correctly extracts the filename (without extension) and the file extension separately from a given file path. The script must correctly handle filenames containing multiple `.` characters (e.g., `a.b.js` should split into name `a.b` and extension `js`).
Part of PrimeIntellect/Terminal-Lego-15k.