![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PC connection to an old UNIX machine | tonyingesson | UNIX for Dummies Questions & Answers | 8 | 01-24-2006 10:56 AM |
| missing Path(in UNIX) when i launch a job on to unix machine using windows SSh | megastar | UNIX for Advanced & Expert Users | 1 | 11-04-2005 04:36 AM |
| HTTPS connection unix | rkumar28 | UNIX for Advanced & Expert Users | 2 | 06-24-2004 04:20 PM |
| unix to unix serial connection question | typsam | IP Networking | 1 | 10-17-2002 01:39 PM |
| Unix/WindowsNT Connection | elrod | UNIX for Dummies Questions & Answers | 2 | 11-20-2000 05:13 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Connection to another Unix machine
Requirements
I'm running a shell script from one Unix server A which calculates the line count using "wc -l" of a file which resides in another unix server B. I have tried the ssh also but i'm not very clear about it and its throwing error. The command I'm trying to use is: ssh user1@serverB /temp/tmpdir/wc -l abc.txt Please let me know how can i achieve the same using the shell script. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
What error is it throwing?
|
|
#3
|
|||
|
|||
|
Error is:
ksh: /temp/tmpdir/wc: not found |
|
#4
|
||||
|
||||
|
try...
ssh user1@serverB cat /path/to/abc.txt | wc -l |
|
#5
|
|||
|
|||
|
ssh -l user host "wc -l /path/to/abc.txt" works too
|
|
#6
|
|||
|
|||
|
Thanks..
both the above command works .. but what if i dont want the word count of that file and just want to make a check whether the file is present on the remote unix machine? how to do that? |
|
#7
|
|||
|
|||
|
In addition to the previos query ... i have tried FTP also.
on 2 machines the connection and the script works fine. But on one machine it gives the following error: ftp: connect: Connection refused ftp: connect: Connection refused What should I do? |
|||
| Google The UNIX and Linux Forums |