bash - extract file name from full file name -


#!/bin/bash files=src/*.erl shopt -s nullglob f in $files   echo "processing $f file..." # ??? done 

how can extract file name full path? , mean - "pathfilename=${f%.*}"?

i'll copy help-output, since has examples , everything.

~$ basename --help usage: basename name [suffix]   or:  basename option print name leading directory components removed. if specified, remove trailing suffix.        --help     display , exit       --version  output version information , exit  examples:   basename /usr/bin/sort       output "sort".   basename include/stdio.h .h  output "stdio". 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -