conda-env-builder/filename_extractor.sh

8 lines
208 B
Bash

#!/bin/bash
extract_filename() {
local fullpath="$1"
local filename="${fullpath##*/}" # Remove the path, retain the filename
local name="${filename%%.*}" # Remove the extension
echo "$name"
}