General :: Yum Update Script With Return Value?
Jul 27, 2010
I am trying to automate yum update of specific package on a remote machine.So far I have this:
#!/bin/bash
# Update my system
if ! yum update w3m
then
failure=1
[Code]...
View 3 Replies
ADVERTISEMENT
Aug 12, 2009
ok, I pressed alt-ctrl-f1 and it displayed my screen with a gui. I then pressed alt-ctrl-f2 and it displayed a textual desktop. I pressed alt-ctrl-f3 and it displayed the same thing. When I pressed alt-ctrl-f1 to return to my gui, it would not let me return to a gui. I was stuck in a cmd line textual desktop.
How, without restarting, do i return to a gui once I press alt-ctrl-f2??
View 3 Replies
View Related
Jul 3, 2010
I have an Ubuntu Linux on a VMWare running and I've installed RPM Package Manager. However when I try to query all packages using the rpm -qa command, I don't get any results returned.
View 2 Replies
View Related
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
View Related
Feb 11, 2010
I am writing a script that will give me the network address that a host belongs to, for example if a machine has a ip address of 192.168.1.4 I want the script to give me 192.168.1.0.
I am able to get the ip address echoed using:
Code:
I am having trouble getting the ip address stored as a variable so I can work with it, below is what I have
Code:
View 7 Replies
View Related
Jul 20, 2010
Alex accidentally deletes his PATH variable.what are some of the problems he may soon encounter and explain the reasons for these problems. How could he easily return PATH to its original value?
View 14 Replies
View Related
Apr 19, 2011
why does md5sum return a dash at the end:
Code:
$ md5sum
string290350295 -
How can I remove this using the md5sum tags?
View 2 Replies
View Related
May 15, 2010
I have called an script in cronjob named get_mac.sh as follows:
#!/bin/sh
MAC=`ifconfig eth0 |sed -n 1p|awk '{print $5}'|awk -F : '{print $1$2$3$4$5$6}'`
ARG_FILE="/etc/asterisk/scripts/server.params"
[code]....
View 1 Replies
View Related
Apr 2, 2010
I tried to format my harddisk (160 GB) with the following command
dd if=/dev/zero of=/dev/sda
After some 3 hours, following error came up:
dd: writing to '/dev/sda' : No space left on device
312581809+0 records in
312581808+0 records out
160041885696 bytes (160 GB) copied, 10708.3 s, 14.9 MB/s
View 2 Replies
View Related
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
Sep 14, 2011
In my .bashrc I have the following lines to turn on colors for grep and ls alias ls='ls --color=auto'export GREP_OPTIONS='--color=auto'.I've tried changing the alias to export LS_OPTIONS='--color=auto' but that doesn't work.Is there anyway to use an export instead of alias. And are there actually any benefits to one way over the other?
View 2 Replies
View Related
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
Mar 17, 2011
each time my linux is booting, it check something like eth0 and something else. but there is something i write below that fail... Code: could not receive return value from daemon proccess?
View 3 Replies
View Related
Jul 9, 2010
I have a script in /etc/rc.d/init.d named foo. I want to start/stop/restart my process as follows:$ foo start But I do not see the [OK] message once it starts. There is no shell prompt returned either. It seems that my own process is the problem. The executable that foo calls is built from this sample code:
int main()
{
do {
printf("Hello world
");
sleep(1);
} while (1);
}
Do I have to return some kind of signal handle for this to work?
View 6 Replies
View Related
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
Mar 18, 2011
my code is very simple:
int pid, status;
printf("parent process id=%d, to call fork
",getpid());
if(pid=fork()<0)
[Code].....
but everytime I can only get two fork return pid=0. In parent process, the pid returned by fork() should be >0 and equal to the child process id.
View 1 Replies
View Related
Mar 22, 2011
i using Popen() sys call in my code to run a script. i know it will return file pointer. but requirement is some how i need to get return status of process which is invoked by popen. there any possibility to get its status, if so please let me know. FYI i cant use system() here becoz of some limitations
View 5 Replies
View Related
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
Mar 9, 2010
I have a text file have carriage return code ^L , ^K , I can use vi to read this code , can advise if I want to see this code , what can i do
View 4 Replies
View Related
Mar 20, 2011
I would like to return the last part of a string in an array of strings in bash.
The array contains in each position the content below:
Code:
a.b.c
a.d.f
a
a.d
[Code].....
View 5 Replies
View Related
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
Apr 26, 2010
i am using Centos 5, i am trying to mount win2k3 server on centos machine.i am getting the following error.CIFS VFS: cifs_mount failed w/return code = -11
View 2 Replies
View Related
Jun 13, 2011
I have ASCII files to parse that 48 hours old or more ; I can identify them like so
Code:
find . -name "FILE*TXT" -mtime +1 -exec ls -ltas '{}' ';'
Some files have a list of hardware errors (we test electronic components), some have none. If the file name has no errors, I still want to display a message like so
Code:
grep ^err R*VER && echo "No error"
FILEA.TXT:err->USB3910err
FILED.TXT:err No Error
This grep statement works but it seemingly overrides the find() statement above if I run both at the same time... How can I combine the two statements to create a report that lists the filename and error(s) like so
Code:
FILEA.TXT Button3320err
FILEB.TXT USB3235err
FILEC.TXT IR Remote2436err
FILED.TXT No error
Is it possible to return "No error" with the file name without error?
View 11 Replies
View Related
Aug 19, 2010
Am new to KDE and have deleted 3 of my 4 desktops and cant figure out how to return the default. It seems like I'm gonna need a Bash command
View 2 Replies
View Related
Jun 28, 2011
I learn C++ reading the <C++ primer 4th>, question1.2 let me test if return -1 how the compiler handle this exit code.
and in gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52), I get this show:
[youxi600@Arthas C++ Primer]$ cat q1_2.cpp
int main()
{
return -1;
}
[youxi600@Arthas C++ Primer]$ gcc q1_2.cpp -o q1_2
[youxi600@Arthas C++ Primer]$ ./q1_2
[youxi600@Arthas C++ Primer]$ echo $?
255
[youxi600@Arthas C++ Primer]$
anyone can give me an advise? Many thanks!
View 13 Replies
View Related
May 30, 2011
I'm currently on a Linux machine and the shell prompt is showing me the last return value and number of executed commands (picture included, with these numbers shown in purple).
My own computer doesn't have this, how can I configure it? I'm using Xubunto, if more details are needed let me know -- I'm not much of a Linux user (I don't know what's relevant here).
View 3 Replies
View Related
Jan 21, 2010
When I type xlock and press return key, I am getting the following error:
Unknown mode: xlock: bad command line option "swarm"
What should I do? I just need the basic xlock screen locking functionality.
View 1 Replies
View Related
Jun 24, 2011
Where can i find a list of cronjob return codes for linux/unix
View 1 Replies
View Related
Jul 8, 2011
I am running an embedded Linux Release 2.4.19-uc0.
I have code in several places that calls
reboot(LINUX_REBOOT_CMD_RESTART)
successfully. I need to put it into a new place in a application running on the system. When I do, it seems to just lock up the system and does not return from the call nor leave me able to Telnet in or Ping or anything. I've tried puttingtrace code in to write info out to a file, but that too is not working (as it never returns from the reboot() call.I don't get any error from reboot(), it just does not return and does not appear to restart the system.
View 3 Replies
View Related
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