Simple question abt Copy command.

Hi ! All

This is very simple question....

How to write a 'cp' command interative.

Example :

cp /wlsuite/om/cm/Tools/deploy_scripts/*.xml ${INF_ROOT}/tmp | echo "[DONE]" || echo "[ERROR] Pls investigate ..."

My intent was
> to copy the files.
> CP fails... then let know the user.

pls help...

Don't pipe to echo "[DONE]", it doesn't do what you want and masks out the return code from cp

Perhaps you meant

cp stuff && echo done || echo error

The cp command will display an error message by itself if copying fails, so perhaps what you are doing is superfluous.

Am adding small correction to that

cp stuff stuff_copied && echo done || echo error