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
Post a Comment