Skip to main content

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.

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
copy text file , rename name.sh. ypou have right click , set permission execute.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] How do I write a Script or shell?


Ubuntu

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support