Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 1
    can you edit the question to show the exact error you get? Commented May 24, 2022 at 7:43
  • 1
    Why not simply use a boring old POSIX "${x%.*}.wav"? Commented May 24, 2022 at 7:46
  • Then the minor things here are that you probably meant ${x:r} and that in zsh just expanding $1 wouldn't by default take it as a glob. But you edited that now. Commented May 24, 2022 at 7:52
  • Thanks for the suggestion, but ${x.r} also has the same error, which I am guessing is because I wrap that in a string as the file names contain spaces "${x.r}". Perhaps I need to generate the output filename separately... Commented May 24, 2022 at 8:05
  • Does your script start with a line like #!/usr/bin/zsh? If not, it will be interpreted by sh, not zsh. In this case, the shell will complain about zsh-only syntax. Commented May 24, 2022 at 8:16