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
FONE(1) 						      General Commands Manual							   FONE(1)

NAME
fone - control ISDN telephone SYNOPSIS
fone [options...] DESCRIPTION
Fone manages an AT&T 7506 ISDN telephone set. Program control is supplementary: normal functioning of the phone is not affected. The set must be equipped with the ProPhone1.5 ROM or equivalent. To initialize after the ROM is first installed, push the then the button, and set parameters as follows: DATA MODE: B2 DATA RATE: 19200 PARITY: SPACE LOCAL MODE: AT Fone should be run once per terminal session; it accepts commands typed in its window. If the file exists and is writable, it will contain a log of calls. A permanent log file may be initialized with: chmod +a call.log >call.log Options for fone are: -f file The telephone is controlled through file instead of /dev/eia0. -l file Calls are logged in file instead of call.log. -m The mike is not muted when a call is dialed with the handset down (see below). -t cmd The t command (see below) runs cmd instead of /bin/tel. Commands to fone are read, one per line, from the standard input. c string Call telephone number string. Non-alphanumeric characters are discarded, and the appropriate prefix (9, 91, or none) is guessed from the length of the result. (If there is no active call, and string begins with a digit, the initial c may be omitted.) C string The alphanumeric characters in string are dialed exactly as given. d Drop the active call, or the last party added to a conference call. h Put the active call on hold. k string Add a party to a conference call. The active call is placed on hold, and string is parsed and dialed. Once the second call is connected, the command with no argument adds the new call to the previously active call appearance. If the called party is indis- posed, the commands and will drop the second call and reconnect the first. q string Query the local switch for directory entries matching string (a surname preceded by up to two initials, like or r id Reconnect a call on hold and make it the active call. If the appearance id is omitted, it defaults to that of the lowest numbered call on hold. s Show the id, state, and calling information for each call. t string Run the tel(1) command on string. x string Transfer the active call. The active call is placed in limbo (similar to hold), and string is parsed and dialed. Once the second call is connected, the command with no argument bridges the two calls together and drops the intermediary (you). If the called party is indisposed, the commands and will drop the second call and reconnect the first. . string Transmits the converted Touch-Tone string to the called party; a string that begins with a or a digit doesn't need the preceding (See command c above if no call is active.) ? Print a summary of commands. The command may be given before or after lifting the handset; if the handset is down, the call is placed with the speaker on so you can hear what's happening. The mike is normally muted, but the -m flag (see above) overrides this. FILES
call.log log of calls /dev/eia0 RS232 line to phone SOURCE
/sys/src/cmd/fone BUGS
The speaker phone is not really supported. There's still no way to set the clock. FONE(1)
All times are GMT -4. The time now is 10:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy