writing a shell script
I don't know much about shell scripts.
Suppose I'm in a directory with 20 .mid files. Now suppose to change a .mid file to a .wav file I do this: timidity -Ow -s 44100 -o output.wav input.mid What is the shellscript to do that to all 20 .mid files and make all the filenames the same except for the extension? |
#!/bin/bash
for i in *.mid do timidity -Ow -s 44100 -o "${i%.mid}.wav" "$i" done The above script will keep the same filename as the mid file, only the extension will change. |
All times are GMT -5. The time now is 02:53 PM. |