regex - parsing string in bash -
i have bunch of c++ files in directory called src. needed find files have *test.cc, without .cc file type, [filename]test. have:
1 files=./src/*test.cc 2 3 f in $files 4 5 echo "processing $f" 6 done so need name of file, without ./src/ , without .cc. example, above script produce:
processing ./src/utiltest.cc and need utiltest. how can accomplish that?
inserting line between lines 4 , 5 cause bash snippet produce desired output:
f=$(basename $f .cc)
Comments
Post a Comment