Bash script to build up a command
by GPGAgent from LinuxQuestions.org on (#55ACQ)
I know how to use getopts to get input to my bash script, and I know how to write a loop.
What I want to do is to prompt for a start and end points to cut from a video file, and then to build up an ffmpeg command to process the file (I know how to do that).
So it will prompt for
file name - just once - no problem here
then it should prompt for
Start
End
repeat this till it gets an E for Execute
Then I know how to write loop using a count on the number of start /end pairs read.
Quedtion how do I store the start/end pairs, in an array or a list, or some other way?
I'm just looking for some tips please.


What I want to do is to prompt for a start and end points to cut from a video file, and then to build up an ffmpeg command to process the file (I know how to do that).
So it will prompt for
file name - just once - no problem here
then it should prompt for
Start
End
repeat this till it gets an E for Execute
Then I know how to write loop using a count on the number of start /end pairs read.
Quedtion how do I store the start/end pairs, in an array or a list, or some other way?
I'm just looking for some tips please.