Ubuntu :: Wait Command After Execution In Terminal?
Mar 14, 2011
How do I create a command to launch a program and then have the terminal wait for a specified time and then move on to the next command?I'm wanting to create a startup script, and I need program B to wait until program A has finished loading up.
View 2 Replies
ADVERTISEMENT
Apr 12, 2010
I'm not quite sure what's up with this, but when I change the title of a terminal away from the default (e.g. to represent which project that terminal is to be used for), it changes back to the default (user@host:path), but only on the task bar at the bottom of the screen, listing the open windows.
If I change tabs in the terminal and then change back, it displays again at the bottom of the screen, but as soon as I execute another command (e.g. ls), then it resets again. That's quite annoying, as I like to have a few terminals open, each with a set of tabs pertaining to a particular project. The fact that I can't see from the title on the taskbar which is which means I have to guess/remember/check them all...
View 2 Replies
View Related
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
May 9, 2011
Up until now I've been using plink to remotely compile a project I'm working on. But recently the administrator from the remote server updated the distribution and messed up some configurations. My project has a lot of scripts written for tc shell (tcsh), and now the default shell is bash. There is no way to change this. Another problem is that now I need to run newgrp to change my default user group.
So... to work around this problem I've changed my .bashrc to run newgrp and then tcsh. If I do a normal connection using SSH, everything works as expected, but when using plink, or SSH to remotely execute commands, the shell gets stuck on the newgrp command. I think it's because both applications need a return value from newgrp to send the command I need to execute. Remotely running scripts that call a shell also get stuck like newgrp (newgrp also opens a new shell and that's why it gets stuck) my .bashrc is as follows:
Code:
user_grp=`id -g`
if [ $user_grp != 4919 ]; then
newgrp new_group_id
else
[code]....
View 4 Replies
View Related
Aug 19, 2009
I have a script which builds a project and then runs junit tests. However, if the build fails, the junit tests fail with the same error message.Therefore the command which runs the junit tests should only be executed if the build was successful.
View 3 Replies
View Related
Sep 9, 2010
I can't seem to find the Unix command that pauses execution until the user presses a key (i.e. the equivalent of "pause" in DOS). Obviously, I need this for programming. I know about all the performance and security issues of system calls, so please don't recommend I used ncurses or some other library instead. I only plan to use it in small programs that I write to test various algorithms and where perfection isn't needed.
View 3 Replies
View Related
Jan 8, 2010
Problem started after installing a new firewall in my network. originally after installing the firewall there would be a 10 second delay after entering a command before it was processed, the command would be executed however there would be an error, i forget what it said, something about not being able to resolve my domain name (and it would give my domain name). i realized this was a problem with my NAT, so i configured DNS forwarding on my firewall so that any attempt to access my server using my domain name from inside the network would point back at my server. after setting up the DNS forwarding i no longer receive the error about my domain name being unreachable, however there is approximately a 30s delay between entering a command and its execution.
the problem is hardly critical i do not see any more serious problems, it is just a pain to do any work when every time i try to do something i have to wait for it to execute.
View 6 Replies
View Related
Oct 13, 2010
I have seen command like $rm aa dd cc bb ee then something like $ >> zz // it removes zz also Where aa dd cc bb ee zz are the files in my directory. Do not know exactly.
View 6 Replies
View Related
Jun 14, 2010
I have the following command:
Code:
(systool -c fc_host -v && systool -c fc_remote_ports -v) | grep -E '+Class Device path = "/sys/class/fc_host/host[0-9]+"$|+node_name.*= "0x[0-9a-f]{16}"$|+Class Device path = "/sys/class/fc_remote_ports/rport-[0-9]+:[0-9]+-[0-9]+"' | sed -e 's#.*host([0-9]*).*"#scsi-qla1-adapter-node=#' -e 's#.*rport-([0-9]*):[0-9]*-([0-9]*).*#scsi-qla1-target-2=#' -e '$!N;s#
##' -e 's#=.*node_name.*= "0x#=#g' -e 's#"$#;#g' | sort
and I want it to execute via ssh on a remote machine through a script. Therefor I need to escape it properly. Because of the massive use of regular expressions and commandline options, this is not an easy task. Is there any (online) utility that will escape that for bash use? I suppose pasting the code in vi and doing some search and replaces should do the trick. But for that I would need a list of characters to escape...
View 2 Replies
View Related
Jun 21, 2010
I have a script:
Quote:
# Call mail script to send an email
if [ -f /tmp/report.txt ]; then
/usr/local/scripts/mail.pl
sleep 10
rm /tmp/report.txt
else
exit
fi
What I need to do is, I want to check if file exists, if file exists call other script (mail.pl) and then delete the file (assuming mail.pl script executed). If file not exists just exit out of the script. I'm not sure how I can see that other script execution completed or not before I delete the file even though I put sleep command. And also it seems like its not that good, even though it is working. I wanted to see if we can write in more efficient way.
View 4 Replies
View Related
Aug 13, 2009
I want to use ssh to execute a command and to wait endlessly to log everything (in file) that comes as a stream of the connected server. But unfortunately, in the manual its written "If command is specified, it is executed on the remote host instead of a login shell"
So what happens is that when I specify my command:
ssh user@server "my_command"
It executed the command and the flow of execution returns to bash shell. So basically my session ends right after the command is executed. This happens only in case I specify command in the command line. If I login into ssh manually and then type "my_command", then the session doesn't end. I want the ssh not to exit, because after "my_command" executes, I want to capture everything in the session.
View 3 Replies
View Related
Jan 27, 2010
I created a file which in I tried both :
Code:
MAILTO=""
* * * * * /var/www/scripts/script.php >> /dev/null
[code]....
View 5 Replies
View Related
Aug 8, 2010
What is the command for "Open a terminal window and run application in this terminal
View 4 Replies
View Related
May 10, 2010
Is it possible to make terminal (xfce4-terminal) transparent from bash script?
Maybe by enabling compostion?
View 1 Replies
View Related
Feb 17, 2010
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:
Code:
#! /bin/bash
#
#TODO write this for gnome and xterm
[code]....
This same error occurs if the gnome-terminal line is changed to
Code:
gnome-terminal -e mcTerm
Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.
View 1 Replies
View Related
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
Feb 16, 2010
I am trying to learn how to pass more than a one-command startup for gnome-terminal.
I will give an example of what I'm trying to do here:
Code:
#! /bin/bash
#
#TODO write this for gnome and xterm
USAGE="
${0##*/} [-x] [-g]
code....
However, running with the -g option to invoke gnome-terminal, I get a "There was an error creating the child process for this terminal" error.
This same error occurs if the gnome-terminal line is changed to
Code:
gnome-terminal -e mcTerm
Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.
View 4 Replies
View Related
Aug 16, 2011
Bottom Line: Dvd Drive died in my toshiba laptop and it was replaced (not before tech for some reason reformatted the Win7 partition... which was 100% un-needed, but thats beside the point now. I redid win7 (the tech installed vista) and am TRYING to "redo grub". Facts: The Slackware AND Ubuntu Partitions ARE STILL THERE and when i use SuperGrub Boot CD (which doesn't restore my grub by itself) to boot into slackware, i can see ALL THE CONTENT of both Linuxes still there including grub on ubuntu partition
(Tri-Boot: Ubuntu, Slackware, and WIn7) I had it working for two years or so, SO i know this "setup" works fine. I am A) Trying to do this as simply as possible. B) Trying to avoid the need to download a 800MB ISO (as seen for this issue on this forum) and trying not to have to reformat Ubuntu Partition (though I have the .Debs I have downloaded for it backed up ... all 1.7GB of them) I have /dev/sda1 as win7, /dev/sda2 as Slack and /dev/sda3 as Ubuntu (which contains Grub Legacy).. Every command I do seems to result in an error like "invalid command" or "invalid Execution format " (i think that second one is right) type errors. I compiled (awhile back) a few kernels for Slackware, but feel goofy that I cant figure what i this out (what i thought was going to be a "2 minute" fix)
View 4 Replies
View Related
Aug 18, 2009
I want to run a linux command with apache through web browser and that's is not working. and it's working properly when I execute this command through terminal, where is the problem?
NOTE: apache have the privileges to execute the command
View 7 Replies
View Related
Mar 12, 2010
trying to use the dd command from terminal but having a problem cant get the vertical line needed in the command ( | ) ( did this one from character map ) in a winhosed system
View 3 Replies
View Related
Aug 26, 2010
I've already install the GTK+ library development files (libgtk2.0-dev) but I don't understand the following instructions:Then to compile the Equinox engine, extract the corresponding archive in your home folder. In the new directory, run the following commands: ./configure --prefix=/usr --enable-animationmakeWhat is the corresponding archive? Where do I run the command? On the terminal?
View 1 Replies
View Related
Jan 8, 2010
I know how to make things run at startup, and obviously know how to run a command in terminal (type and enter... duhhhh). However I would like to be able to run vnstat in terminal when my computer logs in, this is very handy for seeing how much I have downloaded. I have a terminal embedded on the desktop and would very much like to run vnstat in it for me when it starts, I know I could just type in vnstat when I've logged on, but where is the fun in that? Just having it already there for me would be far better.
The command for starting my desktop terminal is as follows:
Code:
gnome-terminal --window-with-profile=trans --geometry 90x40+280+30
View 2 Replies
View Related
Jan 9, 2010
I want to add an item to my start up... I went to start up and hit add. I want my conky to start up... I need a terminal and the code conky that should start it how do you get a terminal command in start up.?
View 2 Replies
View Related
Feb 27, 2010
Ubuntu won't let me use the sudo command in terminal. If I try, sudo: must be setuid root pops up. Also, if I try any tasks that require permission, the authentication box pops up and then disappears within one second.
View 9 Replies
View Related
Aug 25, 2010
I know this has been asked a 1000 times, but none of the solutions I've read so far work.I need to run the following terminal command every time Ubuntu (10.04 64bit) starts:Code:xset m 9 1This boosts mouse speed to maximum. I don't know why, but it is the only thing that works. All built-in mouse settings are at maximum, yet my mouse crawls across the screen when Ubu starts. So far, I have tried:Creating a startup script called "/etc/init.d/autorun.sh" containing code...
View 9 Replies
View Related
Aug 25, 2010
just bought two new monitors , having major problems installing them,ubuntu 10.04 didnt recognize them at all running at 800x600 they should run at 1920x1080.
i have found various web pages explaining how to adjust the resolution using terminal . the problem i am having that nearly every command i put in commes back with command not found , i thought i needed to be signed in asroot so did this but still the same problem .
View 5 Replies
View Related
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
Nov 9, 2010
I've searched everywhere, but they all talk about BOOTING into the terminal instead of ubuntu. But here all I want is for ubuntu to automatically run a certain command when I boot into ubuntu.This is related to the screen brightness change problem that's still much of an unsolved mystery for ubuntu and I have mostly solved this 'm able to change the brightness with sudo setpci -s 00:02.0 F4.B=xx, xx being from 00 to FF, but it doesnt seem to stay when I log out and log back in. Is there any possible way to put a terminal command in the startup applications or something or a possible solution to the brightness problem that I havent discovered yet?
View 9 Replies
View Related
Nov 27, 2010
In Xubuntu 9.04 I could right click in any directory folder and have the option of opening a terminal window "there". So the terminal command line would open preloaded to that directory. I know, I'm lazy, but it sure made life (and command line work) easier. But it's not available in my new install of Ubuntu 10.04. Now, I know that my gui environment has changed from xfce to gnome, but I would have expected MORE features, not less.
View 9 Replies
View Related
Apr 3, 2011
I just recently installed Ubuntu to do some light perl development. I was installing Adobe Air and after I made the bin file executable, I could not run it with the (./). It says that there is no such file or directory. Here is the output from my terminal:
alan@workstartion:~$ cd Downloads
alan@workstartion:~/Downloads$ ls -a
. hal-9000.png
.. libflashplayer.so
AdobeAIRInstaller.bin mass-effect-normandy-sr1.jpg
[Code]....
I've deleted the .bin and re-downloaded it, I have renamed it, moved it and even tried executing it by removing the .bin and running it from its location. I am still getting the same errors.
View 9 Replies
View Related