I run the following script successfully in terminal in order to split an mp3 file into 3 smaller mp3 files...
split -b 8667k -a1 Monday.mp3 Levin-Hour_; ls Lev* | sed "s/.*/mv '&' '&.mp3'/g" | zsh
However, when I run a similar script within Applescript using the 'do shell script' command, the files split yet none of the 3 newly created files include the 'mp3' extension (they are in mp3 format however). Although I realize that I can simply rename the files within Applescript, the purist in me wants to know how to fix this. Here's what my Applescript command looks like...
do shell script "split -b 8667k -a1 Monday.mp3 Levin-Hour_; ls Lev* | sed " & "s/.*/mv '&' '&.mp3'/g" & "| zsh"
By the way, I know that I can easily split the file via a GUI editor. However, I am trying to run an automated script that downloads several files in a scheduled fashion. Therefore, I want to correct this via scripting if at all possible.
Any insight would be greatly appreciated.
split -b 8667k -a1 Monday.mp3 Levin-Hour_; ls Lev* | sed "s/.*/mv '&' '&.mp3'/g" | zsh
However, when I run a similar script within Applescript using the 'do shell script' command, the files split yet none of the 3 newly created files include the 'mp3' extension (they are in mp3 format however). Although I realize that I can simply rename the files within Applescript, the purist in me wants to know how to fix this. Here's what my Applescript command looks like...
do shell script "split -b 8667k -a1 Monday.mp3 Levin-Hour_; ls Lev* | sed " & "s/.*/mv '&' '&.mp3'/g" & "| zsh"
By the way, I know that I can easily split the file via a GUI editor. However, I am trying to run an automated script that downloads several files in a scheduled fashion. Therefore, I want to correct this via scripting if at all possible.
Any insight would be greatly appreciated.