Sponsored Content
Full Discussion: Stop a shell script
Top Forums UNIX for Dummies Questions & Answers Stop a shell script Post 302232164 by Franklin52 on Thursday 4th of September 2008 02:29:11 AM
Old 09-04-2008
There must be a space between the conditional expression and the brackets:

Code:
mike=1

if [ mike -ne 1 ]; then
 exit
fi

 

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

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

3. 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

4. Shell Programming and Scripting

How to ADD signal stop commands in Shell Script

Hi , I do have a shell which test the connectivity using ssh, soon after the login it should use the keys Ctrl + z or Ctrl + c to exit from login promt. So how do i need to implement these . (3 Replies)
Discussion started by: raghunsi
3 Replies

5. 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

6. 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

7. 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

8. 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

9. 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

10. UNIX for Beginners Questions & Answers

How to stop a shell script if it encounters a error?

I am writing a bash shell script for GarazLab's "WP EMAIL CRAWLER - AUTO SCRAPER & REAL TIME EXTRACTOR". it contains some commands. I want to stop the shell execution as soon as it encounters an error. how to do it? (8 Replies)
Discussion started by: tahsin352
8 Replies
sms_client(1)							   User Manuals 						     sms_client(1)

NAME
sms_client - send messages to mobiles and pagers. SYNOPSIS
sms_client [-v] sms_client [-d] sms_client [-q] [-l loglevel] [service:]number|name[,[service:]number|name] [message] ... DESCRIPTION
A simple client implementation for the GSM Short Message Service (SMS) using TAP. Allowing you to send messages to mobile phones and pagers. Several drivers have also been written for providers who use protocols other than TAP. This client dials the Short Message Service centre and passes on your message addressed to the number or name you specified. Any name you use is expanded to the number from either the Local or Global resource files. The Local file is searched first then the Global file. A user can set up his own preferences to overide those set in the Global file. Information regarding the status of the call is displayed, along with the response given by the SMS centre as the message is transmitted. If no message is present, sms_client takes the message from standard input. OPTIONS
-q Quiet mode, no output. -l All messages output are appended to /var/log/smsclient.log, there are several level of loggin. The default loglevel is STANDARD other loggin levels provided include. 1 - ERROR 2 - WARNING 3 - STANDARD 4 - VERBOSE 5 - EXTREMELY VERBOSE -v Print version information. -d Print all driver/protocols currently built into sms_client. [service:]number|name[,[service:]number|name] A name can be used instead of a number, if a name is used it is searched for in the Global and Local resource files and replaced by the number. You can group names and numbers but they must be seperated by a comma and must contain no whitespace. Numbers must be in International format. For UK Numbers remove leading 0 and add 44 prefix. If a number is prefixed with service: then that service is used in preference to the default service. [message]... A Quoted message that you want to send. If this is absent the message is read from stdin. The maximum length of the message is cur- rently set to a limit of 150 characters, if your message exceeds this length you will be notified with an error message. RETURN VALUES
On Success the return value is set to zero. Any other value indicates an error occurred. Each number dialed will have a corresponding output of the form: [###]SERVICE:NUMBER Where ### is the delivery code, 000 indicates successful delivery other values can be found in sms_error.h EXAMPLES
sms_client 123456 'Hello 123456' Use default service and send message to 123456 sms_client mike 'Hello mike' Use default service and send message to number associated with name mike found in one of the resource files. sms_client mike,angelo 'Hello mike and angelo' Use default service and send message to number associated with names mike and angelo found in one of the resource files. FILES
/etc/smsclient/sms_addressbook The Global addressbook file. Containing names and numbers. ~/.sms_addressbook The Local addressbook file. Contains names and numbers which can override those in the Global resource file. /etc/smsclient/sms_config Containing default service and other sms_client defaults. /etc/smsclient/sms_services Containing service to protocol mappings. /etc/smsclient/sms_modem Containing default modem settings. /etc/smsclient/services Directory containing all services - Each service is denoted by filename (in UPPERCASE) and contains defaults for that service, such as telephone number of service centre, comms params etc. /var/lock/smslock Lockfile generated when smsclient is running. /var/log/smslog Log file where all messages that are produced are copied. AUTHOR
Angelo Masci <angelo@styx.demon.co.uk> changed by Michael Holzt <kju@debian.org> for the Debian/GNU Linux Package VERSION
2.0.7 Linux 19 Oct 1998 sms_client(1)
All times are GMT -4. The time now is 10:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy