General :: My Script Won't Exit ?
Feb 11, 2011When I run my script(attachment) and I use an option(-l -u -r) that requires an argument, it should exit if the argument isn't supplied, but it doesn't. How do I arrange this?
View 1 RepliesWhen I run my script(attachment) and I use an option(-l -u -r) that requires an argument, it should exit if the argument isn't supplied, but it doesn't. How do I arrange this?
View 1 RepliesI noticed that if I have "exit" in a bash script file., e.g. script.sh,that when the word "exit" is reached, and the script file being executed is not in the PATH nvironment, i.e. ". script.sh", the whole konsole shell profile is exited! What gives here? Is there another command compatible to "exit" to prevent this, or will I just have the leave the "." part in the PATH enviroment, which is, to my understanding, is not recommended? I desire for a "goto" function in bash script files
View 11 Replies View RelatedIn linux, creating thread is same as process (clone()), except the virtual address space gets shared with the parent.If a running main process(thread) creates new thread, and if main thread exits, why should the new thread too exit? both are different entities, The same doesn't happen if the child thread exits, the parent thread would be alive.
View 1 Replies View RelatedI've a script that forks to another script.
The problem is that the child will not return to main process.
Main script "fork.sh"
Code:
The child process "smb_fork.sh"
Code:
when running it from the terminal "sh -x ./foork.sh"
Code:
My goal is via cron connect to ~100 remote winXP computers and download a single file. There fore I like to fork the process.
Is there a way to execute top command once and exit...i.e. stop refreshing window and continue console without pressing 'q' or 'ctrl+c'...
View 3 Replies View RelatedSometimes the website will show an alert box akin to "Are you sure you want to leave?" when you try to leave the site. Is it possible to disable this from happening, without using something like the NoScript extension?
View 3 Replies View RelatedIf I copy text into the xterm clipboard from vim, it is cleared when I exit vim. How do I prevent this?
View 1 Replies View Relatedis it possible to execute command and terminate session all in one phrase
something like this connect to server hostname and than execute command "ls" and than some command
ssh username"at"hostname ls "something"
without "something" this phrase connects to server and lists directory, I need something that after listing directory, terminates session.
I have a shell script that creates a file and at the end I want to mail the contents of the file to myself or a group.
Here is what I have but I the script halts and I have to hit <ctrl-d> the n I receive an EOT and the mail is sent.
What I need:
- how to terminate the mail to where is terminates automatically
- can I cat the file contents instead of using -a
Running man, upon exit "erases" what man was displaying. I'd like to leave it up so I could scroll back through it. Is this a function of the PAGER or MANPAGER environment variables?
View 4 Replies View RelatedI have 2 shell scripts, script1.sh and script2.sh. I call script2.sh from within script1.sh ( by simple ./script2.sh command). Based on some condition, i use exit 0 to exit out of script2.sh. I was trying to find if i can exit out of script1.sh as well at once. below is the example
script1.sh
#!/bin/bash
echo "Before ..."
[code]....
When i execute below is the output
Before ...
There was problem file is empty
The Script will Exit. Please fix the issue and run again...
After ...
I am trying to exit out of script1.sh as well so that i dont print "After ..."
Can't install linux on PC. Get the massage "Starting udev... udevd-work[137]: 'sbinblkid -o udev -p/dev/tmp-blo k-7:14' unexpected exit with status 0x000b.
View 3 Replies View Relatedi have done something while changing permission in vi editor. now when i open any file, i am not able to save and exit from it. when i type esc+shift:wq after opening a file. it says cant open file in write mode.
View 5 Replies View RelatedI am trying to run Tomcat on Ubuntu System from a remote host. However, when I exit the terminal, Tomcat process shuts down.
The command I am using to run it is
nohup ./startup.sh &
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!
This is a very simple problem, but I'm scratching my head with others..
In composing a simple shell script in class, we can't seem to get the script to execute fully. script was formatted as follows.
#!/bin/bash
echo "good bye for now"
exit
did, Chmod 755 to make executable
type file name "bye"
runs but wont exit.....
it just echos the type"good bye for now
The instructor says it works for him at home....
But it wont work in class...
Is there a reason it wont "exit" the shell as commanded ?
in middle of my script when i use tar command to tar some 1000 images each of size 5MB,and
all the images are passed as argument
example tar -cvf <file.tar> <all images as argument>
but when i extracted the <file.tar> it does not contains all the images and it displayed error message tar:Error exit delayed from previous errors
in middle of my script when i use tar command to tar some 1000 images each of size 5MB, and all the images are passed as argument example tar -cvf <file.tar> <all images as argument> but when i extracted the <file.tar> it does not contains all the images and it displayed error message tar:Error exit delayed from previous erros
View 1 Replies View Relatedevery time I logout from Xwindow KDE, it doesn't redirect me to Linux command line, instead it was halted without the machine being shut down. How can I exit from KDE and go to Linux command line?
View 10 Replies View RelatedMy two doubts:
(i) In office i open many terminal windows when i start my day and in each terminal i keep on login as different users many times in a day to do some task, by the end of the day when i need to exit from all terminals in a safeway instead of directly closing it i need to execute exit command or CTRL+D many times to close a single terminal safely. Can anybody tell me a way to exit from each terminal in single go, is there any command to acheive this ? I wish if we had a command like exitall like in vi we have :qa command to close multiple files opened in single window. I hope friends you have got what i am asking for ?
(ii) I want a software for debugging shellscripts searched a lot but dint got it.
I'm trying to install the latest NVIDIA drivers (not the ones provided by the 'Additional drivers' application). In order to install them, I need to exit the X-server and terminate all OpenGL processes. How do I do that? I've seen many things like 'press ctrl-alt-backspace' and typing 'sudo /etc/init.d/gdm stop' but none of them work. I'm using Kubuntu 10.10 and gdm doesn't even exist.
View 4 Replies View RelatedIs there a script to do this? I have shotwell and want to find files that are going to cause problems with automatic sorting.
View 3 Replies View RelatedI write a script to read a file which is something like a pipe (or) queue , which shows the running status.In normal case, if i open this file with cat command, i have to use ctrl+c to exit this . What command shall i use to do the same inside a shell script ? I have tried ^C in my script , but it does not exit the process.
View 6 Replies View RelatedI installed Centos 5, httpd 2.2.3 and php5.3.6 with yum.
We have a website which can upload JPEG file to the server via php. But when we uploaded file, it showed the error
Quote:
child pid 13810 exit signal Segmentation fault (11)
I tried to run gdb on my computer and it showed that
Quote:
0xb6d1a600 in ?? () from /usr/lib/libjpeg.so.62
I am trying to upload an IOS in the cisco NAC Appliance. The IOS version has to be updated as 4.8. I am getting the below error when i tried. File is not in gzip format Child return status 1 Error exit delayed from previous errors. I am using the below command to unzip the IOS file. tar xzvf ccca_upgrade-4.8.0-from-4.6.x.tar.gz.
View 3 Replies View RelatedI have made a simple bash script through which i can add, del, edit user from certain file using different CASE variables. like
case
1. adduser
2. del user
3. edit user
Now i want to add a exit CASE like
1. adduser
2. del user
3. edit user
4. exit
Now i want to make a script such a way that, if user input is 4 then only script quit. I used with exit function also but it didn't work. if user press ENTER or other keys then also it quit the program.
I am using RED HAT linux AS-4. I have written a script which execute on job. This script takes the cold backup of oracle database files. The script is
Script:
SQL> !tar cvf /4hd/backup/temp_backup/full_offline_backup_`date +%d-%m-%Y+%H-%M-%S`.ora /home/oracle/oradata/orcl /2hd/oracle /3hd/oracle /backup_ide/oracle --gzip --exclude-from=/home/oracle/backup_scripts/exdtime
[code]....
Error: tar: Error exit delayed from previous errors
Due to this error the backup cannot be restore to standby server.
Is it possible to enforce a certain exit code when using "kill" to stop a process?
View 2 Replies View RelatedWhen i update cache in ubuntu,it is always displaying "waiting for jockey-backend to exit" and then there isn't any reaction.what's jockey-backend? how can i update cache successfully?
View 2 Replies View RelatedI m trying to execute 1st script into other script. I want the 1st script to put the exit staus into a log file .Also i want to ensure that 1st script will always give exit status other than Zero.
Also i want to add text in log file.Like: