Tag Info

Hot answers tagged


You can start a new shell and provide the file as an argument. Then use POSIX parameter expansion to get rid of the path and —if desired— the extension: find . -type f -name "*.pdx" \ -exec sh -c \ 'base="${0##*/}"; printf "%s\n" "$base" > ./tmp/filename_"${base%.pdx}"' {} \;

Only top voted, non community-wiki answers of a minimum length are eligible