Cut command on a remote machine using rsh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Cut command on a remote machine using rsh
# 1  
Old 06-04-2008
Cut command on a remote machine using rsh

Hi all,

I have a file on a remote machine and I want to do a cut operation on that file.

So, I have been doing

rsh <remote> " cut -d " " -f 2 <filename> "
cut: invalid delimiter

But, when I get the file to the local machine and run the same command, I get the o/p required.

can someone help me with this?

Thanks,
Sunny

Last edited by eamani_sun; 06-04-2008 at 04:57 PM..
# 2  
Old 06-04-2008
try...
Code:
rsh <remote> ' cut -d " " -f 2 <filename> '

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with fetching the data from remote machine from my jumpbox(local machine)

Team, Presently i am running a script from my local box(i.e jumpbox) to all the remote machines.Basically fetching basic queries like pwd,mkdir,touch etc and i am able to successfully fetch it from my local machine.But when i want to check certain database related queries like the dbstat... (20 Replies)
Discussion started by: whizkidash
20 Replies

2. Red Hat

iptables applied in local machine, can't ssh remote machine after chain changed to DROP

I want to SSH to 192.168.1.15 Server from my machine, my ip was 192.168.1.99 Source Destination was UP, with IP 192.168.1.15. This is LAN Network there are 30 Machine's Connected to the network and working fine, I'm Playing around the local machine's because I need to apply the same rules in... (2 Replies)
Discussion started by: babinlonston
2 Replies

3. UNIX for Advanced & Expert Users

FTP While transfering files to local machine to remote machine

Hi Am using unix Ksh Am getting the problem while transferring zero size files through the script . When i transfer zero size files from local machine to remote machine manually i can able to do it . My question its beause of zero size files am not able to transfer through script ? or its... (2 Replies)
Discussion started by: Venkatesh1
2 Replies

4. Shell Programming and Scripting

executing command in a remote machine through ssh - shell script

Hi All, i have two machines like x and y . my requirement is i should connect to machine Y from x through ssh connection . and do some operation such as copy and move and delete files in Y machine . i tried with this code but it is doing in machine x only . and i need to exit from Y when... (1 Reply)
Discussion started by: rateeshkumar
1 Replies

5. Linux

rsh to other machine using script

Hi, I want to rsh to other machine & run a script, but it is nt working eg: rsh host command but after this it doesn't login into that machine & run the command on y machine but if i write rsh host then after loggi i write commands it works. Is i am doing something wrong. I jus need... (2 Replies)
Discussion started by: sarbjit
2 Replies

6. IP Networking

RSH to Ubuntu machine from Solaris machine?

This is probably really basic compared to what you guys are usually talking about here, but I have a problem and I have no idea what to do about it. I try to RSH to my Ubuntu computer from my Solaris one and run into a dead end: >> rsh 192.168.1.103 ::ffff:192.168.1.103: Connection timed out... (4 Replies)
Discussion started by: Bradj47
4 Replies

7. Red Hat

To find the LATEST file from a dir on REMOTE machine and SCP to local machine?

Hi All, URGENT - Please help me form a scipt for this: I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server) I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Discussion started by: me_ub
3 Replies

8. Shell Programming and Scripting

awk on a remote machine using 'rsh'

Hi, I want to do a awk operation on a file on a remote machine. I am using rsh for this. rsh <remote> awk '{print $2}' process.txt output: awk: syntax error near line 1 awk:illegal statement near line 1 I can do the awk operation by logging into the remote machine. Can... (1 Reply)
Discussion started by: eamani_sun
1 Replies

9. Shell Programming and Scripting

Execute command from terminal on remote machine

Hi All, I want to execute some commands on unix machine from the mac machne. I have two options for doing so, I am confused which is the best way of doing. Here are two options. Requirement: Execute command on the remote server machine. Commands to be executed itself contain arguments to be... (0 Replies)
Discussion started by: Ranu
0 Replies

10. Shell Programming and Scripting

command not working with rsh(remote shell)

Hi, root@air01a>SS7Manager -status This command gives correct output. But when I write this in script and run it on SUNMC (which can connect to air01 and by default login as root). It gives the error "SS7manager not found" or "can not open". Here is the scripts. #!/bin/sh rsh air01a... (4 Replies)
Discussion started by: lastkey
4 Replies
Login or Register to Ask a Question