Appending a file extension
Philip Massey wrote on Apr 26, 2006
Hi, Mike et al:
I'm experiencing a slightly weird problem: I have a set of files with long
wacky names like
s73475g0.5m15z-0.75t2.0.spec
s73500g0.5m15z-0.75t2.0.spec
s73525g0.5m15z-0.75t2.0.spec
It seems as if anything I do to try to change the end of these names
(using files or "//") results in the new extension winding up somewhere where
I don't expect it. For instance:
files *.spec > in
does the right thing. However, if I then do a
files @in//.fits I get:
s73475g0.5m15z-0.75t2.0.fits.spec
s73500g0.5m15z-0.75t2.0.fits.spec
s73525g0.5m15z-0.75t2.0.fits.spec
Alternatively, if I try a:
files *%.spec%% > in2
and then a
files @in2//.fits I again get a surprise:
s73475g0.5m15z-0.75t2.fits.0
s73500g0.5m15z-0.75t2.fits.0
s73525g0.5m15z-0.75t2.fits.0
If it makes any difference, I am running this under OSX,
with my imtype set to fits.
cheers,
phil
I'm experiencing a slightly weird problem: I have a set of files with long
wacky names like
s73475g0.5m15z-0.75t2.0.spec
s73500g0.5m15z-0.75t2.0.spec
s73525g0.5m15z-0.75t2.0.spec
It seems as if anything I do to try to change the end of these names
(using files or "//") results in the new extension winding up somewhere where
I don't expect it. For instance:
files *.spec > in
does the right thing. However, if I then do a
files @in//.fits I get:
s73475g0.5m15z-0.75t2.0.fits.spec
s73500g0.5m15z-0.75t2.0.fits.spec
s73525g0.5m15z-0.75t2.0.fits.spec
Alternatively, if I try a:
files *%.spec%% > in2
and then a
files @in2//.fits I again get a surprise:
s73475g0.5m15z-0.75t2.fits.0
s73500g0.5m15z-0.75t2.fits.0
s73525g0.5m15z-0.75t2.fits.0
If it makes any difference, I am running this under OSX,
with my imtype set to fits.
cheers,
phil
Mike Fitzpatrick wrote on Apr 26, 2006
I agree there's something weird in the templating code, but if all you want is to add a ".fits" extension try
I'll add this to the bug list as well.
-Mike
cl> rename *.spec fits field=extnI'll add this to the bug list as well.
-Mike
Last post on Apr 26, 2006