Sponsored Content
Top Forums Shell Programming and Scripting Automated FFmpeg Convert Bash Script Post 302422886 by pseudocoder on Wednesday 19th of May 2010 05:20:51 PM
Old 05-19-2010
I noticed a missing quote at the end of sourceext... line, then also a missing quote in the "if..." line between mp4 and the closing square bracket and maybe a missing whitespace between the mentioned quote and closing square bracket.
Code:
    rm ${sourcelocation}/*.avi
    rm ${sourcelocation}/*.mpeg
    rm ${sourcelocation}/*.mov
    rm ${sourcelocation}/*.mpg
    rm ${sourcelocation}/*.txt
    rm ${sourcelocation}/*.nfo

could probably be reduced to
Code:
for ext in avi mpeg mov mpg txt nfo; do rm ${sourcelocation}/*.$ext; done

HTH
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

having a bash script convert ft to meters with 1 decimal

What is the correct syntax to limit the number of decimals to 1 or 0 in a bash script? Here is the partial code I have which works, but if I echo $meters, it has 4 or 5 decimals: METERS=`echo "$FEET * 0.3048" | bc` I read about scale and length in the bc man page, but I can't seem to get the... (2 Replies)
Discussion started by: audiophile
2 Replies

2. Linux

convert avi to cellphone friendly 320x176 mp4 file...ffmpeg to the rescue :)

found a few ffmpeg posts and after a few unsuccessful attempts, I have found a solution :) to encode an avi to to an nokia e71 recognized mp4 format: ffmpeg -y -i inputFILE.avi -acodec aac -ab 72k -s 320x176 -aspect 16:9 -vcodec h264 -b 300k -qcomp 0.6 -qmin 16 -qmax 51 -qdiff 4 -flags +loop... (2 Replies)
Discussion started by: mr_manny
2 Replies

3. Shell Programming and Scripting

Need a script to convert csh to bash

Hi, Can anyone give me a script to convert csh to bash? or any key points which can help me to do so as i am new to it. (3 Replies)
Discussion started by: vineet.dhingra
3 Replies

4. Shell Programming and Scripting

ffmpeg script to convert all movies in a folder for PSP

Hi all, I use ffmpeg to convert my movies to play them with my PSP. I use the terminal version of ffmpeg so i put in the code: ]ffmpeg -i FILENAAM.avi -f psp -r 29.97 -b 512k -ar 24000 -ab 64k -s 320x240 M4V00001.MP4 FILENAAM is the part i replace with the title of the movie i want to see... (17 Replies)
Discussion started by: Ditzyken
17 Replies

5. Shell Programming and Scripting

Bash shell script: Str(007) to int(7),increment it(8) & convert back to string(008)

Hi, I have the following requirement. There will be following text/line in a file (eg: search-build.txt) PRODUCT_VERSION="V:01.002.007.Build1234" I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get... (4 Replies)
Discussion started by: drwatson_droid
4 Replies

6. Shell Programming and Scripting

Automated Bash Install Script

I'm making an automated bash install script. When you install mysql-server using apt-get, there's a blue dialog screen where it wants you to chose your mysql root password. Is there a way to pre-define the password in the apt-get command, or have it not chose a root password? It's not a... (2 Replies)
Discussion started by: Matezius
2 Replies

7. Shell Programming and Scripting

Help: How to convert this bash+awk script in awk script only?

This is the final first release of the dynamic menu generator for pekwm (WM). #!/bin/bash function param_val { awk "/^${1}=/{gsub(/^${1}="'/,""); print; exit}' $2 } echo "Dynamic {" for CF in `ls -c1 /usr/share/applications/*.desktop` do name=$(param_val Name $CF) ... (3 Replies)
Discussion started by: alexscript
3 Replies

8. Programming

Convert Bash script to C

dear all, i need your advice for convert bash shell to C programming INDEX=/zpool1/NFS/INDEX/${1} SCRIPT=/zpool1/NFS/script/${1} LIST=SAMPLE cd ${SCRIPT} for i in `cat ${LIST}` do GETDATE=`echo ${i}|awk '{print substr($1,9,8)}'` /usr/xpg4/bin/awk -F ":" '{close(f);f=$4}{print >>... (2 Replies)
Discussion started by: zvtral
2 Replies

9. Shell Programming and Scripting

Create automated scan of specific directory using bash

I am trying to use bash to automate the scan of a specific directory using clamav. Having this in place is a network requirement. The below is an attempt to: 1. count the extensions (.txt, .jpeg) in a directory and write them to a virus-scan.log (section in bold) 2. scan each folder in the... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. Solaris

Run automated bash commands from sh login shell

I use plink.exe to automate remote commands that return data to Windows machines. This works well on newer servers running Red Hat since the commands were developed for bash and the designated user's login shell is bash. I need to also support older servers which are running Solaris 10 but the... (5 Replies)
Discussion started by: randman1
5 Replies
autovbox(1)						    Linux System Administration 					       autovbox(1)

NAME
autovbox - ISDN voice box (sound converter) SYNOPSIS
autovbox [-2 | -3 | -4 | -h | -v] [-n name] [-p phone] [-l location] DESCRIPTION
Convert .au files (Sun audio format) on standard input into vbox files (vbox audio header) on standard output. autovbox is a link to vboxc- nvt(1). OPTIONS
Autovbox reads from stdin and writes to stdout. -2, --adpcm-2 Convert to ADPCM 2 format. -3, --adpcm-3 Convert to ADPCM 3 format. -4, --adpcm-4 Convert to ADPCM 4 format. -u, --ulaw Convert to ulaw format (default). -n NAME, --name NAME Name to write into the header. -p, --phone PHONE Telephone number to write into the header. -l LOCATION, --location LOCATION City to write into the header. -h, --help Show summary of options. -v, --version Show version of program. SEE ALSO
rmdtovbox(1), vboxtoau(1), vboxmode(1), vboxcnvt(1), vbox(5). AUTHOR
This manual page was written by Andreas Jellinghaus <aj@dungeon.inka.de>, for Debian GNU/Linux and isdn4linux. Now maintained by Paul Slootman <paul@debian.org>. ISDN 4 Linux 3.25 2002/10/15 autovbox(1)
All times are GMT -4. The time now is 07:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy