[Originally posted by linuxuser on 2005-05-30 20:54:19-07]
I don't user perl very much, till now :-) and sometimes I get this error: "line 1: shell-init:: command not found" with a bash-script, that calls exiftool. Unfortunately I am too unfamiliar with perl, to do all with perl. When I wait for a few minutes, everything works fine again.
This could lead also to a very strange results of exiftool, when querying dates, e.g. the year has 2 digits only instead of 4 and there could also be very strange behavior of the system, which I solve with a reboot. But reboot isn't that a linux user wants :-)
I use a fully updated Sarge with newest exiftool.
[Originally posted by scottlindner on 2005-05-30 21:09:51-07]
That sounds like a path problem in your shell script and not a problem with ExifTool. For now, try testing your script using full paths to all files and see if that corrects the problem.
[Originally posted by linuxuser on 2005-05-30 21:34:18-07]
The first line in the script is:
#!/bin/bash
which bash
/bin/bash
I never had a problem, when there was a pause, let's say 1 min. Also I heard of a person, who got the same error with a mailserver and a perl script, so it probably has nothing to do with exiftool. He also told me, that he has no problems, when there is a pause between the script execution.
My script has 2500 lines and therefore there are a lot of possibilities for errors, but it uses full paths always.
[Originally posted by exiftool on 2005-05-31 11:57:55-07]
This definitely sounds like a problem with your system, but it may help things to run exiftool via perl directly. Try running exiftool like this instead:
"perl exiftool ARGS..."
Let me know if this helps.
[Originally posted by linuxuser on 2005-05-31 13:10:36-07]
Hmmh, since it works with my script most times and the error _immediately_ occurs after I started my script, I can't believe it is a problem with my script, although I know my script isn't perfect and I am redisignig it now after a lot of changes and new features.
Maybe there is a connection to some files I use, which generate different errors, when I write a tag with exiftool, especially there are "0x8769 ExifOffset"-errors. IMHO there is an incompatibility with files, changed by newer Photoshop-versions. If you don't know this problem, I will post how to create such a "problem-file".
I am pretty sure it is not a problem of exiftool, but maybe of perl. Since my exiftool syntax works with the script and there are lot of conditions in the script, IMHO it doesn't make very much sense to execute "perl exiftool ARGS". I am sure there will be no problems.
Anyway, it is not a big problem, since I do not execute the script a 2nd time after a few seconds it ended. I wanted to inform you of my problem and maybe some day, one gets a similiar error and then he knows he is not alone :-)
[Originally posted by exiftool on 2005-05-31 14:57:57-07]
I guess I wasn't understanding your problem very well. I'm glad you have a work around, but it would be nice to figure out why this is happening.
The "0x8769 ExifOffset" error is new to me. Please post an example of how to generate this error, and if possible a link to an image with this error. Thanks.
[Originally posted by stephenc on 2006-02-14 06:39:48-08]Anyone ever find a reason for this?
My script works fine, exiftool does what it's supposed to do but I get this annoying error in the output:
line 11: 1: command not found
simple script, here it is:
#!/bin/bash
numfiles=`ls -l |grep "\.CRW" |wc -l`
echo "Found "$numfiles" CRW file/s."
for file in *.CRW
do
`ufraw-batch --out-type=jpeg $file`
jpgfile=`echo $file |sed 's/.CRW/.jpg/'`
`perl /usr/bin/exiftool -overwrite_original -TagsFromFile $file $jpgfile`
done
Thanks
[Originally posted by exiftool on 2006-02-14 12:37:53-08]
The problem is the backticks. Drop them in lines 9 and 11 and you'll be fine.
The backticks replace the command itself with the output of the command. This is not what you want to do. You just want to execute the command, as you did with the echo command on line 5. No backticks are necessary.