ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: Infobleep on December 26, 2010, 07:07:33 AM

Title: After running script in BASH, text I type no longer displays
Post by: Infobleep on December 26, 2010, 07:07:33 AM
Hi there

I am running ExifTool 8.41 on BASH in Snow Leopard. I have created some scripts which I run by doing the following:
./"copyright-artist&IPTCcopies-mac".

I am finding though that after the script is run I can no longer see any text I am typing in. I can see the results jut not anything I type in. If I hit enter the command prompt simply appears straight after the previous one instead of being on a new line.

The last section of my script is as follows so I don't know if that is causing the issue. This issue doesn't occur in Windows DOS.
# *******************************
# *******************************
# ** copyrightNotice - copy from EXIF Copyright **
set v+
exiftool '-IPTC:copyrightNotice<EXIF:Copyright' -L -overwrite_original_in_place -P -r -k "toamend"
set v-
# *******************************


Thank you for your help and Happy Christmas to everyone

Tim
Title: Re: After running script in BASH, text I type no longer displays
Post by: Phil Harvey on December 26, 2010, 02:03:10 PM
Hi Tim,

I don't know what the "set v+/-" does.  Do you have the problem without this?

I would be surprised if this was an ExifTool issue.

- Phil
Title: Re: After running script in BASH, text I type no longer displays
Post by: Phil Harvey on December 26, 2010, 02:15:43 PM
I just tested this on my Mac and don't have the problem in bash.   One question though:

What does the prompt message say?:

"-- press any key --"

or

"-- press RETURN --"

In the first case, exiftool uses Term::ReadKey, which I could believe may cause a problem like this.  On my Mac I don't have Term::ReadKey installed, so I get the 2nd message which just waits with a read from stdin.

- Phil
Title: Re: After running script in BASH, text I type no longer displays
Post by: Infobleep on December 26, 2010, 05:36:49 PM
Thanks for your helpful reply Phil.

set v+ and set v- was my attempt at the echo on and off command on my Mac. I read something on-line some months ago but I probably misunderstood what they meant.

I do indeed get the message press any key so I must have Term::ReadKey. Apart from exiftool and looking at my network settings I've not really messed around with BASH so every is as pre-installed.

Is it fairly simple to move the Term:ReadKey component and am I likely to require it elsewhere if I did remove it.

It would probably be easier to remove the press any key part. I just had that in because in windows I use to run the script from Windows Explorer and without it, the command prompt window would close without me being able to read any of the error messages I might get, usually to do with the temp file name being too long. That thankfully is not an issue on my Mac.

Kind regards

Tim
Title: Re: After running script in BASH, text I type no longer displays
Post by: Phil Harvey on December 27, 2010, 06:36:05 PM
If the problem goes away when you drop -k, then it must be something with Term::ReadKey.  In that case I need to do a bit of investigating to see if I can fix this.

- Phil
Title: Re: After running script in BASH, text I type no longer displays
Post by: Infobleep on December 28, 2010, 11:12:11 AM
Hi Phil

Thank you for your reply. If you can fix it I'm sure other people would find that useful. The -k option isn't that essential for me any more but I'm sure it is for other people.

Kind regards

Tim
Title: Re: After running script in BASH, text I type no longer displays
Post by: Phil Harvey on December 29, 2010, 08:51:43 AM
Hi Tim,

You are really good at finding sneaky bugs.

I have duplicated this problem.  It happens in bash and sh, but not tcsh and zsh.  But I have a solution which fixes the problem, and it will appear in the next release.

- Phil
Title: Re: After running script in BASH, text I type no longer displays
Post by: Infobleep on January 14, 2011, 05:19:28 PM
Thanks Phil. Very grateful. Interesting reply.

I doubt I'll find any more bugs because what I do with Exiftool is fairly limited. I just use it to add and modify certain meta-data in all my photos.

Kind regards

Tim