I have a file: 12345-6789A.prt
I would like to create a directory: 12345-6789+A/
If I have 50 similarily named files (#####-####X.prt) I would like to create 50 directories.
I think I can use sed, for example:
for file in *;
do mkdir `echo $file | sed 's/'$1'/'$2'/g'` ;
done
where $1 is "12345-6789" and $2 is "12345-6789+", but I don't know how to make $1 and $2 be what I want.
Can someone help?
Thanks,
Jeff
I would like to create a directory: 12345-6789+A/
If I have 50 similarily named files (#####-####X.prt) I would like to create 50 directories.
I think I can use sed, for example:
for file in *;
do mkdir `echo $file | sed 's/'$1'/'$2'/g'` ;
done
where $1 is "12345-6789" and $2 is "12345-6789+", but I don't know how to make $1 and $2 be what I want.
Can someone help?
Thanks,
Jeff