Perl script with rsh gets stty invalid message


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl script with rsh gets stty invalid message
# 1  
Old 12-26-2009
Perl script with rsh gets stty invalid message

I have a Perl script, that does a system call with rsh to a remote machine.

#!/usr/bin/env perl
system ("rsh remote-machine echo 99");

And I get the following:

stty: standard input: Invalid argument
99

I've tried replacing the system call with below, but I still get the same stty message.
system ("rsh remote-machine -l myusername echo 99");
I've also tried addin single quotes around the rsh command, i.e. 'echo 99', but it didn't get rid of the stty message.

What does the "stty: standard input: Invalid argument" message mean, & how I get rid of it?

PS. I've tried searching past posts, & there was one in 2002, but it didn't help me.

---------- Post updated at 11:11 AM ---------- Previous update was at 10:50 AM ----------

I just found the answer in an earlier post:

Deleted the following line in my .cshrc:
stty erase ^H
# 2  
Old 12-26-2009
Hello
you would want to check this
http://www.perlmonks.org/?node_id=534691
Hope this helps.
regards.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use of stty vs trap in script-driven login menu

My employers would like me to selectively run one of several different (already-existing) Korn Shell menu-driven scripts out of the user's .profile file, depending on some yet-to-be-specified user critieria. I've never done this kind of thing, but I have the existing scripts (among other... (5 Replies)
Discussion started by: Clovis_Sangrail
5 Replies

2. Shell Programming and Scripting

exec perl in expect script yields "invalid command"

I'm trying to execute something like this: exec perl -i -pe 's/\015/\012/g' '${file}' in my expect script and I get: error "invalid command name \"perl\". however, if I run perl -i -pe 's/\015/\012/g' "/Users/Shared/menu-items.txt" directly in my terminal, it runs fine. I'm an... (4 Replies)
Discussion started by: dpouliot
4 Replies

3. Shell Programming and Scripting

Perl and rsh

Hi guys In perl how can i rsh into the machine ($a) as the user who is currently login into that machine then run this commnad x11vnc -create keeping that alive but back on the origrianl ($b) machine run vncviewer $a i want to give it the machine to rsh/vncv into on the... (0 Replies)
Discussion started by: ab52
0 Replies

4. Programming

Error message: invalid types 'bool...' (array problem)

Hello everyone. I'm stuck with an error message that neither I nor any of my computer science peeps can understand. The program I wrote is meant to be a simple decimal to binary converter, but with this message it's more complicated than I thought. Here's the code: #include <iostream>... (3 Replies)
Discussion started by: qf_woodfox
3 Replies

5. Programming

Error message: invalid types 'bool...' (array problem)

Hello everyone. I'm stuck with an error message that neither I nor any of my computer science peeps can understand. The program I wrote is meant to be a simple decimal to binary converter, but with this message it's more complicated than I thought. Here's the code: #include <iostream>... (2 Replies)
Discussion started by: qf_woodfox
2 Replies

6. Shell Programming and Scripting

stty error when script is called out of a cronjob

Hello, I'm trying to implement a script to call a third-party tool every so often and write the results to a file. If I run it interactively it works fine, but when it comes to run it out of a cronjob, I keep getting this error: stty: tcgetattr: a specified file does not support the... (3 Replies)
Discussion started by: fabiogilr
3 Replies

7. Shell Programming and Scripting

rsh in Perl

How can I use the rsh command in perl? I need to rsh to a machine, change directory and run a C program there. I have something like this: $USER="username"; $MY_DIR="\t\home\" $MY_SCRIPT="./get_statistics.out" system "sudo rsh", $USER, "cd", $MY_DIR, "; sudo", $MYSCRIPT; which obviously... (1 Reply)
Discussion started by: looza
1 Replies

8. Solaris

invalid getconf output and Perl compile

I was compiling perl on a Solaris 10 server. The compile failed because the output of getconf is wrong (it indicates xarch is generic64 not v9. This is a known bug but I cannot find a fix. I wrote a script as suggested that changes it but when you run getconf again it goes back to generic64. ... (2 Replies)
Discussion started by: csross
2 Replies

9. UNIX for Advanced & Expert Users

stty erase in a script

does anyone know how to incorporate this in a script so users can actually make use of their backspace button that they've grown accustomed to? stty erase ^H --- this isn't working the script. works on command line but i wanna invoke it whenever this program of mine is run so users can use... (2 Replies)
Discussion started by: Terrible
2 Replies

10. Shell Programming and Scripting

stty: : Invalid argument

Hello Everyone; I have a script that is throwing the following message: stty: : Invalid argument The line that gives the message is the following, sailormoon$ scp home/voice.xml newwave@silvermoon:/newwave/config/radius stty: : Invalid argument voice.xml | ... (2 Replies)
Discussion started by: tony3101
2 Replies
Login or Register to Ask a Question