Bash scripting 4 – Goals
One of my goals with this, is now to create a script to take the following
ffmpeg -i 20OCT5.mp4 -c copy -an 20OCT5-ns.mp4
Which only works on 1 file, so I need to run and modify the above for each fine in a directory. As I take more video, then the need to have better automation would be useful.
So, the above line of code :
- Takes a single .mp4 file
- Removes the sound content
- Saves the output to a new file that appends the filename with -ns
So a script need to do this with each file of that type in the directory or folder.
Again looking on stack overflow This may point to a solution
for f in *.shp; do printf '%s\n' "${f%.shp}_poly.shp"; done
You will, of course, need to set execute permissions
chmod +x script.sh
Tags
#Bash,#Bashscripting,#BatchProcessing
Mastodon | Peertube | Join Mastodon |
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.