I am trying to do the following in ksh shell:
JMX_ROOT=/bfs-build/build-info/mep_mainline-Linux.latest/core/mainline/automation
SMOKE_JMX_LOCATION="$JMX_ROOT/\"Smoke Set\"/*.txt $JMX_ROOT/\"Smoke Set\"/*.TXT
$JMX_ROOT/\"Smoke Set\"/SmokeSet.jmx"
cp $SMOKE_JMX_LOCATION /var/tmp
I.e. copy .txt, .TXT and .jmx files from one directory to another directory but am getting errors because of the spaces in "Smoke Set".
Any help is much appreciated.
$foo
and$(cmd)
), unless you understand why not to do it in a particular case (start here or here). So: start withcp "$SMOKE_JMX_LOCATION" /var/tmp
, whereupon you realize that you have a single first argument tocp
. Then think carefully about what omitting the quotes would do, and you get l0b0's answer. (Note the double quotes in"${SMOKE_JMX_LOCATIONS[@]}"
, too) – Gilles 'SO- stop being evil' Oct 27 '11 at 21:50