split path from filename #bash

#!/bin/bash

# file
e=”/path/to/file.sh”

# splitted vars
FILEDIR=”${e%/*}”
FILENAME=”${e##*/}”

0 notes