Thanks,
No this is doable I guess..what I am trying to do is:
Using ssh plugin, copy wars to target environment, then I run a script on target environment to deploy those wars. If within the script, I figure out there was error in deployment, I want to get deployment logs back to Jenkins so that I can send them as email attachment.
So I need logs, only if I detect error. And logs can be huge..so I just don't want to cat them with in my script and let it go to console out..So I was looking for elegent elegant solution. I guess, I can set up another job with ssh command you have mentioned, if my deployment job fails due to deployment error (some parameter to the new job)..
Thanks
S