After running script in BASH, text I type no longer displays

Started by Infobleep, December 26, 2010, 07:07:33 AM

Previous topic - Next topic

Infobleep

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

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Infobleep

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

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Infobleep

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

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Infobleep

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