![]() |
| ||
| Problem with SSH Hi, I have written a script file that first makes a ssh connection with the remote system and then does some job. My script file is as follows #! /bin/sh The ssh connection is formed successfully. But sa is not printing anything. just a blank line similarly sa3. But end is being printed. Both text files (1.txt and 2.txt)resides in the remote system. I know the problem is with this line sa=`/usr/sbin/alternatives --config java </root/Desktop/1.txt 2>&1 | grep jdk1.6.0_05` The command is not taking input from 1.txt which is residing on the remote system. Where am i going wrong. |
| ||
| Re: Problem with SSH At the moment you are throwing away the output from running /etc/sbin/alternatives because it gets filtered through grep before you print the value of $sa. Try: #! /bin/sh |
| All times are GMT -4. The time now is 3:39 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC