hello, I would really appreciate any help with this!
i have files in the format ####_*.dat
so like
2913_dsssf_sdfsdf_sddsf.dat
3208889423_lk3mnf_sdfe.dat
what im trying to do is extract the number from the start of the file (end of number will always be followed by _ ) and copy the file to multiple locations, incrementing the # by 1 for each new location
so
2913_dsssf_sdfsdf_sddsf.dat
=
/dir1/2914_dsssf_sdfsdf_sddsf.dat
/dir2/2915_dsssf_sdfsdf_sddsf.dat
3208889423_lk3mnf_sdfe.dat
=
/dir1/3208889424_lk3mnf_sdfe.dat
/dir2/3208889425_lk3mnf_sdfe.dat
huge thanks to anyone who can shed some light on this problem