Avidemux Forum

Avidemux => Stable branch (2.5) discussion => Topic started by: mmasroorali on March 10, 2012, 04:38:42 PM

Title: Problem in running scripts from cli
Post by: mmasroorali on March 10, 2012, 04:38:42 PM
Dear All,
When I have many files to process, and all the files are similar, I find it very convenient to use the scripts and use the avidemux cli version.

However, in present days, with the Avidemux 2.5.4 available with Ubuntu, avidemux in GUI version incorrectly asks whether to use the existing log file. Even when there is no log file to be used.

The same thing happens with the cli version. It keeps on madly asking the same question.

Could you please tell me what I can do.

I have more then hundred files to process and using gui for all these is almost prohibitive.
Title: Re: Problem in running scripts from cli
Post by: Jan Gruuthuse on March 11, 2012, 07:38:14 AM
If you're on Ubuntu 11.10 (Oneiric Ocelot) you could try avidemux 2.6 @
avidemux Cli / QT / GTK 2.6 32-bit deb download (http://www.avidemux.org/smf/index.php?topic=10270.0)
avidemux Cli / QT / GTK 2.6 64-bit deb download (http://www.avidemux.org/smf/index.php?topic=10059.0)
With very basic scripting: have not seen this behavior with?
If the functions you need are not in 2.6 and you're not on Ubuntu 11.10 (Oneric) you could try one of these 32-bit:
Ubuntu 10.10 (Maverick Meerkat) or 11.04 (Natty Narwhal) (http://avidemux.org/nightly/)
Title: Re: Problem in running scripts from cli
Post by: Jan Gruuthuse on March 12, 2012, 06:30:31 AM
In the script single > overwrites and >> appends.

If you're using a more complex script, where text should be appended to a log file created by this script? Check syntax in script for missing ( or ). The action captured for redirection should be enclosed by rounded brackets?
(
# action to capture starts here
echo "Current desktop: " $DESKTOP_SESSION
echo uname -o -r -s -i
echo "this is the end of my script"
) 2>> /tmp/filename.log


NOT TESTED or NOT CONFIRMED TO WORK: Put one of these at beginning of the line where the log is used and you get the prompt "to use the existing log file"
this would reply: y when input is expected:
Or echo "yes" | Or use the yes command?yes |

this would reply: y when input is expected
yes n |

more info:
type man yes