loops - how to write in bash a function that detect partial names of multiple files in multiple folders? -


i have multiple files e.g. singleta.dat singletb.dat singletc.dat in multiple folders. each file presents common part < singlet > , extension .dat, , variable < b c ...>. go through folders contain these files, , independently variable b c ... convert file name sing.dat example. in bash exist function allows detect these partial variables?

thanks in advance! tommy

you can use find. example:

find mydir -name "singlet?.dat" -execdir mv {} sing.dat \; 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -