I am running this command in my shell script
ssh "$machineName" "ls -ltr /export/home/user/clients/
$clientDir
" >> "$source"_loadDirs.out
But the machine name could be sometime be virtual name and sometimes the real name, If the machine name is virutal i need to run this command and retrieve the real name "autorep -m". But if it real name I should run the above command. Please advise how can I incoporate this in a script.
Start Free Trial