I've been trying to load the DOS prompt with the following Linux command using echo, set /p and clip in a DOS prompt session.
Here is the Linux one-liner to check the uptime for 14 blades on a server:
Code: Select all
for b in 01 02 03 04 05 06 07 08 09 10 11 12 13 14; do echo;echo "BLADE ${b}";ssh -q `hostname | cut -d "-" -f 1`-s00c${b}h0 "echo -n 'BOOT TIME: ';who -b | tr -s ' ' | tr -d '\n';echo -en '\nUPTIME: ';uptime"; done"
The result is as follows:
Code: Select all
C:\Utils>echo|set /p="for b in 01 02 03 04 05 06 07 08 09 10 11 12 13 14; do echo;echo "BLADE ${b}";ssh -q `hostname | cut -d "-" -f 1`-s00c${b}h0 "echo -n 'BOOT TIME: ';who -b | tr -s ' ' | tr -d '\n';echo -en '\nUPTIME: ';uptime"; done"clip
'tr' is not recognized as an internal or external command,
operable program or batch file.
If I omit the 'tr' command, it works, however, I would like to use the 'tr' command on the Linux session. I did try using quotes around the 'tr' commands but the results are not correct.
Any ideas?
Bjoern