Thread: How do I write a Script or shell?
i want automate simple process using script of shell or whatever it's called terminal (we used call them "batch" files in old dos days).
here commands want execute in order. want them execute sequentially upon completion of previous command-
1rst command- ffmpeg -i videofile1.avi -sameq intermediate1.mpg
2nd command- ffmpeg -i videofile2.avi -sameq intermediate2.mpg
3rd command- cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg
4th command- ffmpeg -i intermediate_all.mpg -sameq fonal.avi
please keep simple- i'm not knowledgeable in programming.
try ...
operator && runs second command after , if first command executed properly.
copy text file , rename name.sh. ypou have right click , set permission execute.code:#!/bin/sh ffmpeg -i videofile1.avi -sameq intermediate1.mpg && ffmpeg -i videofile2.avi -sameq intermediate2.mpg && cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg && ffmpeg -i intermediate_all.mpg -sameq fonal.avi
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] How do I write a Script or shell?
Ubuntu
Comments
Post a Comment