I want to create a command which uses the result of another like this:
JNLP_FILE='find . -name viewerApplet.jnlp'
cp ${JAR_FILE} ../../sign-jar/$PROFILE/
But I don't know how to execute the find command to use for the 'cp' command.
Any help?
Answer
You can use a dollar sign followed by the command in parentheses [$(
] to have the output of that command fed directly into the command line:
cp $(find . -name viewerApplet.jnlp) ../../sign-jar/$PROFILE/
Alternatively, you can use backticks (`):
cp `find . -name viewerApplet.jnlp` ../../sign-jar/$PROFILE/
No comments:
Post a Comment