Hi
I'm trying to run a command on Mac OS in Terminal to batch modify a folder of MLV files to rewrite their WhiteLevel.
I have a [working on PC] Powershell command that I'm attempting to rewrite into bash that is not working on Mac so far. When I run it, the terminal beeps, and the screen is filled with a flood of random characters until I stop it. The mlvs remain unmodified.
Can someone help please?
Powershell (working)
Bash (not working)
Many thanks.
I'm trying to run a command on Mac OS in Terminal to batch modify a folder of MLV files to rewrite their WhiteLevel.
I have a [working on PC] Powershell command that I'm attempting to rewrite into bash that is not working on Mac so far. When I run it, the terminal beeps, and the screen is filled with a flood of random characters until I stop it. The mlvs remain unmodified.
Can someone help please?
Powershell (working)
Code Select
$FILES = Get-ChildItem .\\* -recurse -Include *.mlv
foreach ($file in $FILES) {
echo "Processing $file..."
echo "0000068: FF 3F" | xxd -r - $file
}
Bash (not working)
Code Select
#!/bin/bash
FILES="/Users/me/Desktop/media/*.mlv"
for f in $FILES
do
echo "0000068: FF 3F" | xxd -r - $file
cat "$f"
done
Many thanks.