Plz Help : How to use write command to execute command on some other terminal


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Plz Help : How to use write command to execute command on some other terminal
# 1  
Old 03-03-2006
Plz Help : How to use write command to execute command on some other terminal

Hi Group ,
I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages.

- i m writing

>write user-id
! ls
o
ctrl-d

inspite of executing the command ls,other terminal shows ! ls.

Thnx in advance.
# 2  
Old 03-03-2006
your commands or sequence of characters would be interpreted only as messages to be executed by write command on a particular tty

even if you try,
Code:
echo "ls" > /dev/pts/3

it would be taken only as a message to tty-3 and not as a command
# 3  
Old 03-03-2006
According to our rules:
(11) These are not hacker boards so hacker related posts will be promptly deleted or moderated.

Trying to execute a command on someone else's terminal raises security concerns so I will close this thread.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies

2. Shell Programming and Scripting

How to execute a command on each line of output from another command?

Hello :) new to bash not to programming. I have an on-going need to change the owning group on sets of files and directories from the one they were created with or changed to on update to the one they need to have going forward. find {target_root} -group wrong_group gets me a newline... (4 Replies)
Discussion started by: naftali
4 Replies

3. Shell Programming and Scripting

When i am trying to execute export command within a shell script it is saying command not found.

I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found" My code is as follows: -------------------------- #!/bin/sh user="test" DIR="/bldtmp/"$user VIEW="test.view1" echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies

4. UNIX for Dummies Questions & Answers

Need help with SED command plz

I need two solutions 1) How can i swap the first and last character in each line of file temp 2) How can i display content of the file using sed command Please help (2 Replies)
Discussion started by: champu
2 Replies

5. Shell Programming and Scripting

Is command line invocation of gnome-terminal to run more than one command possible?

Hello, I am trying to learn how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here: #! /bin/bash # #TODO write this for gnome and xterm USAGE=" ______________________________________________ ${0##*/} run... (0 Replies)
Discussion started by: Narnie
0 Replies

6. Shell Programming and Scripting

write a shell script to execute a command

Hello all, I have just started doing shell scripting. I want to read a file which stores the status of my job I have submitted on a cluster. The file looks something like this : ========================FILE============================= crab: Checking the status of all jobs: please wait... (4 Replies)
Discussion started by: learn_linux
4 Replies

7. Shell Programming and Scripting

How to build a command into a string rather than execute the command

I'm trying to populate a command line into a variable. It appears to be executing, instead. Here's an example: mycmd='' if ...; then $mycmd='sudo ' fi $mycmd=$mycmd 'sed -i prev s/aaa/bbb/' $myfile res=`$mycmd` (I'm also not sure of the best way to execute the command from the... (1 Reply)
Discussion started by: littlejon
1 Replies

8. 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

9. UNIX for Dummies Questions & Answers

explain command plz

echo -n "1. Updating Password Policy in OID..." | tee -a $logfile set ldap_v1 = `ldapsearch -b "" -h $oid_host -p $oid_port -D "cn=orcladmin" -w $admin_pwd -s sub "cn=PwdPolicyEntry" dn | head -1` echo "dn:$ldap_v1" > ldap1.out echo "changetype:modify" >> ldap1.out echo... (2 Replies)
Discussion started by: maoro
2 Replies

10. UNIX for Dummies Questions & Answers

Urgent!! How to write a shell program to execute command to access internet?

hi, I am new ot unix. So, can i write a shell(c shell or korn shell) program to access internet? I mean if I run the program, it can access specified url and then copy the html to a file? Can anyone help me? And how can make the program runs every 1 hr? new comer (2 Replies)
Discussion started by: firebirdonfire
2 Replies
Login or Register to Ask a Question