PeterKamphuis / FAT

FAT is now surpassed by pyFAT (https://github.com/PeterKamphuis/pyFAT-astro) a much more flexible and hopefully more accurate version of the code. The IDL/GDL wrapper is merely retained for historical purposes. FAT is an IDL/GDL wrapper to automate TiRiFiC
MIT License
4 stars 0 forks source link

Renaming of files produces error #3

Closed ngiese closed 8 years ago

ngiese commented 8 years ago

Whenever the rename command is called by FAT.pro, e.g.

line 2852:  spawn,'rename 1stfit. 1stfitold. 1stfit.*',isthere

I get error messages similar to the following one:

Bareword found where operator expected at (eval 1) line 1, near "1stfit"
    (Missing operator before stfit?)

The files are not renamed. If I replace the above mentioned line in FAT.pro by e.g.

spawn,"rename 's/1stfit./1stfitold./' 1stfit.*",isthere

the files are properly renamed. I am running FAT on a Linux system.

PeterKamphuis commented 8 years ago

Yes there are many different renames circulating and it actually depends on the operating system I believe. I will see if I can find a solution to this that is more uniformly applicable. Until then there are two options you can do.

a) find a rename that works in the way that FAT wants, i.e. ---> rename string replacestring inputfiles The one I'm running can be found here http://plasmasturm.org/code/rename/ and is aliased to use -s as a standard option. For Mac OS users this is the rename that installs through homebrew.

b) replace the rename lines with the correct command on your system. There are 10 occurrences in the code on line 2837, 2852, 3527, 3919, 4348, 4355, 4356, 5038, 5081, 5179 of the current code in the main file. None of the subroutines should use rename.

PeterKamphuis commented 8 years ago

FAT now no longer requires the rename command.