Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to stop a shell script if it encounters a error? Post 303041720 by MadeInGermany on Monday 2nd of December 2019 12:59:31 PM
Old 12-02-2019
It works in bash-4 and I am confident that it works in bash-5.
Perhaps you have bash-3? Run /bin/bash --version.
Or you invoke your script with "sh script" instead of "/bin/bash script", or you run "/path/to/yourscript" and your script has a shebang that is not #!/bin/bash.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

stop Prstat using shell script

How to stop the Prstat using shell script ? because after i run the below script the thing seems to be always in loop and cannot get out till i ctrl + c, is there anything that i can add in the script to make it terminate ? <code> #!/bin/sh prstat -Tc -u testing > testing.txt </code> ... (19 Replies)
Discussion started by: filthymonk
19 Replies

2. Shell Programming and Scripting

ssh command in ksh script encounters permission error

I've created a script and copied it to another server and try to execute it at the same time but I'm getting a permission error. I'm logged on as root and I gave the file 777 permission when I created it, but I can't run it remotely via ssh command because of permission issue. Any ideas? ... (5 Replies)
Discussion started by: pdtak
5 Replies

3. UNIX for Dummies Questions & Answers

Stop a shell script

Hi, I am writing a bash shell script. How can I tell it to stop. For example, I would like to have something similar to the following: mike=1 if ; then STOP THE SCRIPT fi (3 Replies)
Discussion started by: msb65
3 Replies

4. Shell Programming and Scripting

How to stop asking password while running shell script?

Hello, I am ftping the file from one unix box to another box. This script works fine. Only problem here is, it is asking the password when ftp the file. How can i stop that. I am providing the password inside the shell script. But it is not accepting this. I need to put this script in crontab.... (5 Replies)
Discussion started by: govindts
5 Replies

5. UNIX for Dummies Questions & Answers

Script triggering Korn shell, how-to stop it?

Script_A.sh has echo "In am in script A" ksh ## K-shell is invoked. Script B.sh ## which I am writing... ./script_A.sh echo "I am in script B" return 0 When I run: $> Script_B.sh $> I am in script A $> Basically, on calling Script_A.sh from within Script_B.sh I have the issue of... (2 Replies)
Discussion started by: baivab
2 Replies

6. Shell Programming and Scripting

Help with stop/start Shell Script.

Hi All, I would like to develop a shell script for stop & start an application server (1-4) on Solaris box. Here are the user requirements for this task. 1. User will input the option which server they wish to stop. 2. Will clear cache files from specific location. 3. ... (1 Reply)
Discussion started by: venga
1 Replies

7. Shell Programming and Scripting

Stop! (the countdown!) :-) shell script help

Hi guys, I've found two nifty little scripts on these forums one which detects if the F5 key has been pressed: #/bin/sh _key() { local kp ESC=$'\e' _KEY= read -d '' -sn1 _KEY case $_KEY in "$ESC") while read -d '' -sn1 -t1 kp do _KEY=$_KEY$kp ... (0 Replies)
Discussion started by: rich@ardz
0 Replies

8. AIX

Shell script stop working

I have a strange problem. I have the following in a cron to find files older than a day. find /dir1/dir2/ ! -name . -prune -name "s*.txt" -type f -mtime +1 -exec echo {} \; | wc -w It was working fine for the last few days now it suddenly stopped working. I can clearly see files in the... (5 Replies)
Discussion started by: bbbngowc
5 Replies

9. Shell Programming and Scripting

Password in shell script for apps stop

Hi folks, I am running a shell script it asks for username and password to stop some service, I need to write some script that it will read username and password from my shell script and then sucessfully stop services without prompting username/password query. (13 Replies)
Discussion started by: learnbash
13 Replies

10. Shell Programming and Scripting

Shell script to stop and start server

Hi, I need to create a shell script for automated server patching, with the following scenario: I have two Linux servers Primary and secondary. Server patching should start on Primary 1st and then secondary. 1st check both servers are up and running. Then stop primary and patching will... (1 Reply)
Discussion started by: rcroyal88
1 Replies
gst-complete-0.8(1)						   User Commands					       gst-complete-0.8(1)

NAME
gst-complete-0.8, gst-complete - perform bash completion for gst-launch command lines SYNOPSIS
complete -Cgst-complete-0.8 gst-launch gst-complete [--gst-list-mm] [--gst-mm=string] [--print] DESCRIPTION
gst-complete-0.8 enables bash to provide context-sensitive tab completion for gst-launch command lines. See gst-launch(1) for the syntax of gst-launch command lines. You must have a version of bash that supports programmable completion. Such versions of bash provide the complete built-in command. gst-complete is a wrapper script that runs the latest installed version of gst-complete-X.X. For example, if both gst-complete-0.7 and gst- complete-0.8 are installed on your system, gst-complete runs gst-complete-0.8. OPTIONS
The following options are supported by gst-complete-0.8 and gst-complete: --help Display detailed usage message. You can also use -? to specify this option. The following options are supported by gst-complete only: --gst-list-mm List found major/minor versions. This option displays the versions that are available. --gst-mm=string Force major/minor version. This option enables you to specify a specific version to run, if you do not want to run the default version. --print Print wrapped command line. This option displays the command that will be run, and then runs the command. EXAMPLES
Example 1: Generating the Registry of Available Plugins by Running gst-compprep Run the following command in your .bash_profile or other appropriate place: example% complete -C gst-complete-0.8 gst-launch Example 2: Running the Wrapper Script and Displaying the Command Name example% gst-complete --print /usr/bin/gst-complete-0.8 FILES
The following files are used by this application: /usr/bin/gst-complete-0.Executable for bash completion for gst-launch /usr/bin/gst-complete Wrapper script that runs the latest installed version of gst-complete-X.X ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-media | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gst-compprep(1), gst-feedback(1), gst-inspect(1), gst-launch(1), gst-launch-ext(1), gst-md5sum(1), gst-register(1), gst-thumbnail(1), gst- typefind(1), gst-xmlinspect(1), gst-xmllaunch(1), gstreamer-properties(1), libgstreamer-0.8(3), libgstgetbits(3) NOTES
Original man page written by the GStreamer team at http://gstreamer.net/. Updated by Brian Cameron, Sun Microsystems Inc., 2004. SunOS 5.10 14 Oct 2004 gst-complete-0.8(1)
All times are GMT -4. The time now is 06:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy