i have simple script takes users input remote host address
, based on selection make log want tail, script start tailing log.
example:
printf "\nenter customers cloud url:\n" read -r customerurl printf "\nwhich log want tail?\n1. jlog\n2. clog\n3. hlog\n" read -r whichlog ssh "$customerurl" tail -f /path/to/log
when doing this, script runs once done ssh'ing host, ends. trying possible? there better way handle this?
combine ssh , tail tail runs on remote host instead of local one.
ssh "$customerurl" tail -f /path/to/log
Comments
Post a Comment