The message generally means that either you don't have write permission in the current directory to create a new file, or else 'shifts.dat' already exists and you are trying to overwrite it. If you meant to append, use the ">>" operator (I realize you didn't write the script), otherwise you can set the 'clobber' variable to allow overwriting existing files.
Joined: 07 Jun 2011 Posts: 9 Location: Willamette University
Posted: Fri Jul 15, 2011 4:44 pm Post subject:
Thanks. I deleted the file shifts.dat. Now the script calculates the first shift, creates shifts.dat and writes the shift to the file. However, when it gets to the next shift, since the file exists, it runs into the same "cannot open file "shifts.dat" for writing.
I checked and I have the noclobber variable set to "off".
I'm having trouble finding the meaning of the >& operator. Can I change the operator so that it will overwrite the file?
I can't use the append operator >> since looking at the script I think it calls imshift on one image at a time, so the file always needs to have one line.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum