General :: [Bash] Send Command To Another Terminal?

Sep 10, 2010

I open up 2 xterms on my desktop, A(/dev/pts/0) and B(/dev/pts/1).I can write from A to B using redirection e.g. echo "test" > /dev/pts/1How do I run a command from A on B? e.g. "clear"Basically I'm putting the 2 terminals side by side, and using terminal B to display the contents of the current working directory, by running the following in A:export PROMPT_COMMAND="ls -a > /dev/pts/1"but this fills up the screen pretty fast. I was actually looking for a way to clear up the second terminal.

View 6 Replies


General :: Send Command To Another User's Screen Terminal

Mar 22, 2011

I have two users; user1 and user2. I have a bash script run by user1, that needs to run a command on a screen terminal started by user2.

View 1 Replies View Related

Ubuntu :: Terminal Bash / -bash: Ls: Command Not Found

Jun 5, 2011

I got a problem with terminal, since i'm really a noob with terminal i don't know how to fix it.Everytime i type in a command it shows for example:

-bash: ls: command not found

Even the basic commands don't work... just cd <directory> and those things works

View 9 Replies View Related

Ubuntu :: Send Command To Another Terminal?

Sep 10, 2010

I open up 2 xterms on my desktop, A(/dev/pts/0) and B(/dev/pts/1).

I can write from A to B using redirection e.g. echo "test" > /dev/pts/1

How do I run a command from A on B? e.g. "clear"

Ideally I should be able to do this from a script.

View 7 Replies View Related

Security :: Script To Send A Command VIA Terminal To Wipe An Entire Machine Of Data?

Sep 16, 2010

Is there a script I can use to send a command VIA terminal to wipe an entire machine of data? If for example there is an intrusion valuable data can be at risk, it would need to be erased.

View 14 Replies View Related

General :: Send The Output Of Send Command To A File?

Jan 20, 2011

in the middle of script, i need to send the output of (send command on line 8) to a file

spawn telnet
expect "ENTER USERNAM <"


i treid the below on line 8 :

1- send "show command;

" > logfile.txt : gives an error extra character after the "

2- logsave logfile.txt 'send "show command;

" ': error invalid command

3- i simply tried to send the output of the whole script to file logsave /home/logfile ./script : seems that logsave work under root only

4- ./script > logfile : the problem with this is that the output of echo or (read "enter your id") command will not be displayed on the screen (actually nothing will be displayed, i have to open the log file to see the output). is there any way to save the log of the "send" ? or to save the log of the complete script without hiding the output on the screen?

View 2 Replies View Related

Programming :: Run A Command On A Separate Terminal In A Bash Script?

Apr 6, 2011

I'm trying to do something here:: I'm writing a bash script, I want to [open a new terminal and run a bash command in it] inside the script. I tried to use this, but apparently I get syntax errors.


#! /bin/bash
echo "echo Something" > ~/
chmod +x ~/
xterm -e sh -c ./

View 14 Replies View Related

Ubuntu :: Short Key To Command Histroy In Terminal Running Bash?

Jan 20, 2011

In windows command prompt, F8 key can cycle through your previously entered commands i.e say you enter "ping" and then "pushd <dir>". Next when you type p and then press F8 brings pushd and next F8 brings ping command. You can then hit enter to execute the corresponding command i.e ping in this case.Is there anything similar in Ubuntu Terminal running bash? Very handy to get back previously entered commands.

View 3 Replies View Related

Programming :: Write A Bash Script Program In System Command Terminal?

Mar 22, 2010

I'm trying to write a bash script program in the Linux command terminal that will write to a fellow user and then continue reading down the program. this is what i have (kind of explains the idea too):


echo "this is before the write command"
write jcummins
this message should go to jerry
echo "the message didn't send and this string will not appear"
echo "it appears it has stopped at the write command"

View 5 Replies View Related

General :: Write A Literal Bash Command In A Bash File?

Nov 29, 2010

I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:

cat > ~/ << END


View 6 Replies View Related

General :: Send Notifications From A Bash Script?

Sep 28, 2010

How to write to KDE's OSD or notification from console?

i want to send a notification to the kde4 notification area (in desktop panel) from a small script. Is there a program for? I cant find anything.

View 1 Replies View Related

General :: Send Crlf In Bash Script?

Jul 19, 2011

I have written a simple script that are sending some data to a plc. But i must end my sending with crlf for the plc to accept my sending. The script is started in inetd.

while [ $i -lt 1 ]
echo -n "1111111111"


View 3 Replies View Related

General :: Send Files To Trash Using Terminal?

Mar 20, 2011

I typically use rm to delete files, but they don't end up in my trash folder in case I want to recover them. How do I make that happen and how do I access my trash folder via terminal? Doing me best to work from terminal rather than GUI and this one has me stumped. I am using Mint Julia.

View 2 Replies View Related

General :: Send Message Via Terminal In Windows?

Dec 6, 2010

How to send message via terminal in windows or linux?

View 4 Replies View Related

General :: Make Linux Terminal Transparent With Terminal Command?

May 10, 2010

Is it possible to make terminal (xfce4-terminal) transparent from bash script?

Maybe by enabling compostion?

View 1 Replies View Related

General :: Bash Script To Continuously Ping Server And Send Email

May 7, 2010

I'm trying to write a script that will continuously ping a server and then send out an email when the server is down, and then when it is back up. Then, continuing with monitoring. I would like to not run this in cron, because I don't want to script to run with multiple instances.

For example,
Ping a server every minute.
-If successful, do nothing.
-If failed to ping, then send out email stating that server is down.
-Once ping is successful, then send out email stating that server is up.

I only want it to send an email once after a failure, so the end user isn't get an email every minute that it fails. Once it is successful, then send the email (one time), stating that the server is up. Then, continue to ping and if fails again, repeat the process.

View 4 Replies View Related

General :: Bash Command History Update Before Execution Of Command

Jun 7, 2010

Bash's command history is great, especially it is useful when adding the history -a command to the COMMAND_PROMPT.However, I'm wondering if there is a way to log the commands to a file as soon as the Return key is pressed, e.g. before starting the command and not on completion of the command (using the COMMAND_PROMPT option would save the command once the prompt is there again).

I read about auditing programs like snoopy and session recorder like script but I thought they're already too complex for the simple question I have. I guess that deactivating that script logs all the output of the command would lead already in the right direction but isn't there a quicker way to solve that probelm?

View 1 Replies View Related

General :: What Does This Cryptic Bash Command Mean - Why Command Crashes

Mar 20, 2011

Possible Duplicate: What does this cryptic bash command mean? Why this command crashes Linux? :(){ :|:& };:

View 4 Replies View Related

General :: Command To Delete Bash Command History?

May 31, 2010

What's the command to delete bash command history?

View 4 Replies View Related

General :: Append Command Output To File By Giving Command In Terminal?

Jul 3, 2009

I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?

View 4 Replies View Related

General :: How To Send Command To Daemon

Jan 20, 2011

I have a minecraft server running as a daemon. When you run it normally (not as a daemon), you can type commands into the console. How can you get to the console so I can send it commands while it's running as a daemon?

View 1 Replies View Related

General :: Particular Command To Send Different Signals?

Mar 10, 2010

We all know how to kill multi process but if we want to send different signals to different process like to stop,-9,to hungup simultaneously at the same time then how we will do it,is there any particular command to do it.

View 1 Replies View Related

General :: Net Send Command In Linux

Dec 20, 2010

hope you will know the net send command of the same way we are working on linux red hat 5.0 we want to know the equivalent command of net send for linux if any body know then please tell us? we are here only when we not found on google so please do not give the suggestion of searching on google.

View 5 Replies View Related

General :: Bash - Using Terminal Vs KDE?

Mar 18, 2010

Im used to using nautilus within centos but have recently just got a VPS and quickly realising that using a KDE is unacceptable in this environment. Although I do find it so much quicker doing things like folder permissions in KDE rather than typing it all out in the terminal? Everyone I speak to says, use the terminal and I should learn this way as opposed to using the KDE, but theres certain things I just dont get

How is it possible to make quick changes to scripts and viewing them in a browser etc , without a mouse or using KDE? and only using a terminal?? I am wondering how to develop websites just using the terminal?

How can it be quicker to type out/view permissions etc in the terminal when its instant and just a few clicks in the KDE?

View 3 Replies View Related

General :: Send Enter Command To Screen ?

Apr 5, 2011

I'm currently writing a C++ application to manage some screen functions in Debian(server).

However this issue have bothered me for 2 days now...

What I want to do is to send a command to an attached screen which is running.

Used the following command: Code: screen -S screenwindow So I send a command with the -X parameter, which works just fine... Code: screen -S screenwindow -X stuff yes The command I want to send is "yes" and it does appear in my screen window when I attach it.

But the problem is that I need it to submit it... well I need to press "enter" and I've been looking everywhere on how to do that.

Because right now it hangs on a line like this: Code: Something here, do you want bla bla: yes Obviously I could just press enter myself, but the problem is that it's running as a deamon and but it is supposed to do this all by itself .

So are there any way I can submit it?

View 4 Replies View Related

General :: Configure The At Command To Send To Someone Other Than Root?

Jul 6, 2010

Is there a way to configure the at command to send to someone other than root?

View 1 Replies View Related

General :: Send Email From Command Line?

Mar 2, 2011

I'm looking for an easy way to send basic emails for the command line. I have tried configuring sendmail and mailx, but I have yet been able to receive a test email at my remote address. I have read through a fair amount of "how to" on this but I am a little confused and obviously not doing something right. My file is as follows

VERSIONID(`$Id:,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')

When I try to send a test mail via


View 14 Replies View Related

General :: Unix Command To Send File To Printer?

Mar 28, 2010

Is it true that the UNIX commands to send a file to a printer for printing are system-dependent?

View 2 Replies View Related

General :: Send A File From One Computer To Another By Command Line?

Jan 27, 2010

I've got a Debian Squeeze computer on which the graphics have packed up, but the terminal in single user mode work perfectly fine.

There are a few files on this Debian computer that I want to transfer off, to a networked computer, but I have no idea how to do this.

The destination computer is a freshly re-setup Mandriva install, without (as yet) samba. I don't think it's necessary though. The Mandriva install works fine, has graphics, etc, but can't see the Debian Squeeze computer on the network, possibly because it's in single user mode, thus prompting the problem of how to transfer the files, using only a command line.

View 6 Replies View Related

General :: Failing To Send Mail From Command Line?

Mar 16, 2010

I am using Ubuntu 9.10 and when I tried to send mail from the command line I get: /usr/lib/sendmail: Permission denied. any takers on this.

View 6 Replies View Related

Copyrights 2005-15, All rights reserved