[Lazarus] Command line interpretation on Linux console program...

Carlos E. R. robin.listas at telefonica.net
Thu Apr 11 22:30:44 CEST 2019


On 11/04/2019 22.03, Bo Berglund via lazarus wrote:

> 2) Another issue concerns the parsing of command line parameters.
> Originally I had set it up to use ; as separator for the two time
> values of a clip, starttime and duration (in seconds) as follows:
> t1234;500 for a duration 500 s clip starting at 1234 s into the source
> video.
> But for some reason the ParamCount variable contains 3 when the
> command line looks like this:
> 
> videosplitcmb -x -iorg.mp4 -t0;1768 -t2420;2972 -otest4.mp4
> 
> There should really be 5 parameters: -t, -i, -t, -t, -o
> 
> Why is ; treated as some kind of block for the command line parsing?

Bash also stops at the ';', it is a command separator. It is like
entering two commands like this:

videosplitcmb -x -iorg.mp4 -t0
1768 -t2420;2972 -otest4.mp4

You have to escape the ';', like this: '\;'


In fact, if "videosplitcmb" is your program, it doesn't even see the
second part, it is bash who stops at the ";" before calling "videosplitcmb".

-- 
Cheers / Saludos,

		Carlos E. R.
		(from 15.0 x86_64 at Telcontar)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190411/0e9e2bc3/attachment.sig>


More information about the lazarus mailing list