I'm trying make a .iso file using xorrisofs, but I'm getting error like this :

bash: syntax error near unexpected token `('

Command I'm using :

xorrisofs -o system-($arch).iso     \
      -b boot/isolinux/isolinux.bin \
      -c boot.cat                   \
      -no-emul-boot                 \
      -boot-load-size 4             \
      -boot-info-table              \
      -joliet -l -R                 \

The parenthesis by themselves are used to group commands (in a subshell), e.g.

(echo foo ; echo bar) | cat -n

But that doesn't make sense in the middle of a command line, so Bash takes it as an error. (Other shells treat it differently, zsh takes that as a glob, ksh93 just leaves the parenthesis as-is and expands the variable.)

They probably meant either "system-${arch}.iso" to take the value of the variable arch; or "system-$(arch).iso" to run a command arch and use its output on the command line. Both of those should be used within quotes.

If you want literal parenthesis (and the variable expansion), again quote the whole string: "system-($arch).iso".

Same for the ($arch) at the last line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.