linuxShortcuts/Dolphin/copyPath.sh

9 lines
184 B
Bash
Raw Normal View History

#! /bin/bash
filelist=""
for line in "$@"; do
filename=$(basename -- "$line")
folder=${line%"$filename"}
filelist="$filelist$folder\n"
done
printf "$filelist" | xsel -b -i