General :: Get Return Value From Command Run Within Screen?

Jan 13, 2010

I'm trying to get a return value from the command running within screen. I have tried

Code:
screen "some_command ; echo $? > retval"
but this refuses to write "retval".

[code]....

View 1 Replies


ADVERTISEMENT

General :: Command To Return Number Of Bits (32 Or 64)?

Nov 7, 2010

What is a Linux command that I can run to programmatically return either 32 or 64 to indicate whether the processor is a 32 bit or 64 bit processor?

View 4 Replies View Related

General :: Return Code 1 For Useradd Command?

May 2, 2011

getting a error return code for useradd commandthe return code is 1cite or tell me the explanation of return code 1 .

View 1 Replies View Related

General :: Get A Return Code For The Command Ldapmodify?

Mar 31, 2011

I need to get a return code for the command ldapmodify.I try this and didn't workrc=ldapmodify -a -v -c -p $PORT -h $SRV -D cn=$USR,cn=Users,dc=company,dc=com -w $PWD -f $LDIFFILENAMECOUNTecho "return code " $rc what exactly the way to get the return code of that ?

View 2 Replies View Related

General :: Pass Carriage Return To A Command?

Feb 18, 2011

How can I pass carriage return to a command. I am writing a shell script whcih generates ssh key pair. It ask for input from user three times. I want to pass carriage return (ie. press Enter button) to this command. Is tehre any way

View 8 Replies View Related

General :: Tomcat - Why Does 'ls' Command Return Some Results In [squarebrackets].jar

Nov 25, 2010

Below is an example output of what I see when I run the 'ls' command on some directories in linux (this is from a tomcat/common/lib directory). However I'm not clear on why some of the filenames are appearing inside [square brackets]

-rw-r--r-- 1 root root 1038825 Aug 30 2006 [ant].jar
-rw-r--r-- 1 root root 566376 Apr 1 2008 [commons-collections].jar
-rw-r--r-- 1 root root 107392 Aug 18 2006 [commons-dbcp].jar

[code]...

View 2 Replies View Related

General :: Getting LESS To Return Back To Command Line If A Short File Is Displayed

Aug 12, 2010

Is there a command line option that will allow less to return to the command line if there are not sufficient lines in the file to warrant paging.

View 1 Replies View Related

Programming :: Echo Hello Command Does Not Return

Jan 11, 2010

I am testing the serial ports on a Single Board Computer(SBC) running Linux kernel 2.6.29. I usually do this by connecting the serial port to another PC serial port, then doing "cat /dev/ttyS0" on PC and "echo hello > /dev/ttyS0" on the SBC. However in the current system, "echo hello > /dev/ttyS0" command does not return at all! Also no characters appear on the destination port. I am running the echo command as root. The system boot messages show that the serial port in indeed /dev/ttyS0.

View 2 Replies View Related

Ubuntu :: Allow Empty Return From Read Command?

Feb 19, 2010

I am writing a short script to do some backups.Here is a small section of it:

Code:
echo -n "Please enter your choice ..."
read CHOICE

[code]....

View 3 Replies View Related

Programming :: Return Error From Ioctl Command?

Jul 21, 2010

I'm creating a usb device driver that needs to be able to read from two different endpoints. I couldn't see any way of having two read functions in the driver, so I got round this by reading from one of the endpoints with read, and the other with ioctl.However this hasn't worked, the ioctl call from c returns -1. I added a printk command in the driver in the ioctl function, however looking at kern.log I can see that this function is never being called. Does anyone have any ideas as to what the problem called be, or a better method of being able to read from two different endpoints?

View 2 Replies View Related

Software :: Start The Jboss And Return To The Command Console?

May 25, 2010

Normally one can start the Jboss with

Code:

./run.sh -c server-name

But in this way the command console will keep hang. Now I want to write a script which calls u this command and return back to the command console. Here is what I wrote but it doesn't return back to the command console:

Code:

#!/bin/sh
MSGBP_HOME="/opt/jboss/MSGBP"
case "$1" in
start)

[code]...

View 1 Replies View Related

Programming :: Pass Carriage Return To Command Through Script

Feb 18, 2011

How can I pass carriage return to a command in the shell script. I am writing a shell script whcih generates ssh key pair. It ask for input from user three times. I want to pass carriage return (i.e., press Enter button) to this command.

View 2 Replies View Related

Ubuntu :: Egrep Command To Return Matches For A Group Rather Than The Whole Pattern Itself?

Jan 17, 2011

To put it simply I want the egrep command to return matches for a group rather than the whole pattern itself.For example:

Code:
egrep "reals([0-9]+?m[0-9]+?.[0-9]{3}s)" tmp
returns
"real 0m1.001s"

But I want it to return just "0m1.001s", the portion is the group. I can just apply egrep to whatever the first command returns but is there an easier way to do it?

View 4 Replies View Related

Programming :: Find Command Return True If File Found?

May 18, 2011

How to manage the find command to return true or false if a file was found/or not? I tried to man find but didn't found anything.

View 12 Replies View Related

Ubuntu Installation :: Unable To Return From Screen Blackout?

May 5, 2010

In a nutshell: If the computer goes to blank screen (set that way in screensaver settings) I can hit a key and get the unlock dialog. However, if I walk away for longer and come back, I can't get the machine to wake up. It is powered on, but nothing comes up on the screen. I can't get other terminals by using ctrl-alt-FunctionKeys, either. I CAN, though, ssh into the machine from my desktop computer, and that works normally.I've installed 10.04 off of a live CD onto my Toshiba Satellite A45-S250 laptop. I had originally tried upgrading from 9.10 on the machine, however it wouldn't boot after the upgrade. The live CD also originally wouldn't work for me until I used a work around that involved adding "i915.modeset=0 xforcevesa" to the boot command line of the "Install Ubuntu" option of the live CD. This caused the CD to install, and now the laptop works properly.

The computer boots normally now, but on shutdown, the screen does go all "squiggly" before turning off.This doesn't interfere with the shut down or start up, though.I can post whatever logs or such that would help, but would have to be told what is relevant here. I've been using ubuntu on and off on this laptop since sometime in 2005, and have never experienced an issue like this.

View 2 Replies View Related

Ubuntu :: Disable Login Screen On Return From Suspend / Hibernate

Jan 8, 2010

I would like to disable the login screen when the computer returns from suspension and hibernation, so that it will automatically log me back in. I am using Ubuntu 9.10.When I come back from suspension, for some reason, my key board does not work in the login screen and I cannot type my password.

View 9 Replies View Related

Ubuntu :: Separate X Screens - Can't Return Pointer/cursor To Primary Screen?

Sep 16, 2010

I use a laptop, and frequently plug in to a separate monitor or to a TV screen. I have it set up to to separate X screens. When using my laptop touchpad, I find that once I move to the other monitor or TV screen, I can't return back to my laptop monitor. My USB mouse, however, is able to transition from screen to screen with no problem. I am using ubuntu 10.04 but had the same problem with 8.04 before I upgraded. I have an NVIDIA graphics card, and use the nvidia-settings (which generates the xorg.conf file) to manage the screens. Here is my xorg.conf:

Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@crested) Sun Feb 1 20:25:37 UTC 2009
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder58) Fri Aug 14 18:33:37 PDT 2009

[Code]...

View 2 Replies View Related

Ubuntu :: Moving Mouse During Blank Screen Does Not Return To Gnome Desktop

May 21, 2011

An ubuntu-11.04 laptop is set to turn on the screensaver after 5 minutes of inactivity, and power management is set to blank the display after 15 minutes of inactivity. When the screen goes blank, you're supposed to be able to move the mouse to return to your Gnome desktop. This works sometimes, sometimes not. When it doesn't, moving the mouse doesn't eliminate the black screen, although I can see the mouse cursor. ctrl+alt+del does nothing, neither do alt+tab, alt+esc or ctrl+alt+esc. ctrl+alt+f1-12 work as they usually do, so I can "sudo /etc/init.d/gdm restart" from one of the TTYs, or via ssh.

I tested just now with setting the screensaver and power management display blanking to 1 minutes. After a minute the screen went blank (backlight on), and then after a second or two black (backlight off), and moving the mouse returned to Gnome as it should. So I don't know why sometimes it doesn't. Two questions:

1- Which program can I run, or which service can I restart, to return to Gnome without having to kill gdm and lose all open windows?

2- What's causing this?

View 9 Replies View Related

General :: Run A Second Command In Same Screen Session?

May 5, 2011

I'm starting the first command in screen like this: screen -d -m -S testen -t lalala watch df -h Now I have a screen session running in background and I can reconnect at a later time. But how can I run a second command (in a new window) in the same screen session?

View 1 Replies View Related

General :: Goes To The Start Of The Command In Screen

Jul 30, 2011

After running a command that spits out a lot of output in screen. I drop to Copy mode and try to find where the command start. This becomes very very challenging when there are lots of lots of similar text to sift through. Is there a way for me to quickly scroll to where my command starts?

View 2 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 :: Command To Log Off User Who Froze Screen

May 6, 2011

I was looking for a command to log off the user who froze the screen. I logged in as a new user but I got some errors now all I see is the color screen, how can I log the new user off (the GUI)? I did the above command but nothing came in return?

View 8 Replies View Related

General :: Setting Up Screen For KDE GUI From Command Line

Jun 12, 2010

While attempting to install an external screen on my laptop I messed up the KDE screen settings and upon reboot I get a command line interface.Which configuration file should I edit to set up my screen so that I get my Debian lenny KDE GUI back?

View 4 Replies View Related

Ubuntu :: Login - Enter My Password To Login The Screen Becomes Black And Return Me Again

Apr 15, 2011

I just bought this desktop from my friend and it runs win 7 and ubuntu 10.04. it worked very well the first two days until I changed the hostname of the system.

I did like: hostname myNewName

And everything worked fine. The problem now is when I start ubuntu and and reach username and password screen , I enter my password to login the screen becomes black and return me again to the screen where I put my password again. If I entered wrong password , the system message stating wrong password. On the other hand, when I try to run ubuntu from live-cd I can login easily and access my account.

My friend told me he removed Naultius package and reinstall it for some reason before he gave it to me. Note windows 7 is working properly.

View 6 Replies View Related

CentOS 5 :: 5.4 Wont Return From "screen Saver"?

Dec 7, 2009

After the 5.4 OS sits with no user activity for 15 or so minutes, the screen goes black. This is anticipated, but no key combination seems to bring it back to life.

I discovered that Ctr+Alt+BackSpace ends the login session and takes you to the login menu. This is better than nothing but it isnt exactly what i had in mind.

Does anyone know how the key combination to return to the current user session, or how to disable the screen entirely.

View 3 Replies View Related

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

General :: Command Line - How To View More Of My History In Screen

Jun 28, 2011

I was running scripts overnight from the command line (inside Screen on a Linux EC2 instance) and some errors that I was not tracking occurred. I want to "scroll up" or view more of the history in Screen, but I cannot seem to find any commands that will work. I need to see the onscreen output "further up" than I can on my current screen. CTRL + a is supposed to put me into scroll mode inside Screen, but it's not working.

View 4 Replies View Related

General :: Changing Screen Resolution From The Command Line?

Feb 2, 2010

I am having an install problem where the distro I am installing, installed at the wrong screen resolution. The display settings menu doesn't offer the correct resolution so I'm using half my screen real estate.

View 5 Replies View Related

General :: Clear Screen Command For BASH Shell

Jan 21, 2010

I am unable to use clear or cls command on bash shell. I have recently installed Cygwin and am using that for practicing unix commands.

I see that I can use Ctrl + L to clear the screen. I created an alias in my .bashrc to do the same as
alias cls='^L'

This is how i defined other aliases e.g.

And they work. Hence I assume cls will work too but this is what I get when I try to give cls on command prompt. Am i missing something? Is there a way to do this?

Then someone suggested, You cannot alias keystrokes to commands or vice versa. You could just alias cls to an echo command: echo -en "x0c"

And I added the following to .bashrc,

Sourced the .bashrc file. No errors but cls still does not clear the screen. Infact when I typed the echo -en "x0c on command prompt as well, nothing happened. What does this command do?

View 3 Replies View Related

General :: Command To Find Co-ordinates Of Pixel On Screen?

Apr 4, 2010

I was wondering if theres a commandline prog that could give me an 'X' (like xprop does) so that I can point to a particular pixel and it give me the X and Y cordinates of that pixel?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved