11
test:
    @echo "#!/bin/bash\njava -classpath \"$(CLASSPATH)\" com.atm.ATM \"$@\"" > test
    @chmod a+x test

I am trying to escape the "$@" so that it literally appears in the "test" script as "$@" (passing the arguments invoked on the bash script to the java program).

Things that I have tried:

"$$@" -> ""
"$$@@" -> "@"
"$@@" -> "<target>@"

How do I do this?

xomm
  • 331

1 Answers1

12

Figured out how to escape it - needed a backslash: "\$$@"

xomm
  • 331