Sponsored Content
Top Forums Shell Programming and Scripting How to exit a shell script if a unix command does not return any value for 10 seconds? Post 302683685 by neutronscott on Wednesday 8th of August 2012 10:18:02 AM
Old 08-08-2012
Does this 'connection string' happen to be ssh? Or maybe something else that has an option for connection timeout?

You can kill a program after 10 seconds, but do you want it dead in 10 seconds if the login was successful? How would you know?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using exit command in a shell script

Can it be done? If so, how? I would like a script to contain the exit command, and log me off at script completion. thanks (1 Reply)
Discussion started by: jpprial
1 Replies

2. UNIX for Advanced & Expert Users

Move command return with exit code of 2

I have a script which loads data files into Oracle and then moves each file into a 'processed' directory when each file has finished loading. Last night I found that the script was failing on the mv statement (with a return code 2) and the following message, mv: cannot access... (1 Reply)
Discussion started by: handak9
1 Replies

3. Shell Programming and Scripting

command does not return exit status due to tee

Hi, I am using /bin/sh. I want to display the stdout and stderr on the terminal as well as save it in a file, so I'm using this command. gmake all 2>&1 | tee log But even if gmake fails, it's always giving 0 as exit status, i suppose because of tee. # false 2>&1 | tee Log # echo $? 0... (2 Replies)
Discussion started by: anand_bh
2 Replies

4. Shell Programming and Scripting

Exit script if the user dosent enter any data within 5 seconds

Hello friends, Kindly help me in developing a script that asks user to enter a value and will wait for 5 seconds for the feedback. If there is no answer from the user the script will perform exit or it will continue doing something else Ex: If yu have a multi OS system i believe while... (3 Replies)
Discussion started by: frozensmilz
3 Replies

5. Shell Programming and Scripting

problem in exit status of the command in a shell script-FTP

Hi All, I have developed below script for FTP a file from unix machine to another machine. ftpToABC () { USER='xyz' PASSWD='abc' echo "open xx.yy.zbx.aaa user $USER $PASSWD binary echo "put $1 abc.txt" >> /home/tmp/ftp.$$ echo "quit" >> /home/tmp/ftp.$$ ftp -ivn <... (3 Replies)
Discussion started by: RSC1985
3 Replies

6. Shell Programming and Scripting

store last command exit status in variable in shell script

Hello All My req is to store the exit status of a command in shell variable I want to check whether the file has header or not The header will contain the string DATA_ACQ_CYC_CNTL_ID So I am running the command head -1 $i | grep DATA_ACQ_CYC_CNTL_ID Now I have to check if... (6 Replies)
Discussion started by: Pratik4891
6 Replies

7. Shell Programming and Scripting

Exit code from piping in unix shell script

Hi , I have following code in my shell script : "$TS_BIN/tranfrmr" "${TS_SETTINGS}/tranfrmr_p1.stx" "${TS_LOGS}/tranfrmr_p1.err" | ( "$TS_BIN/cusparse" "${TS_SETTINGS}/cusparse_p2.stx" "${TS_LOGS}/cusparse_p2.err" | ( "$TS_BIN/tsqsort" "${TS_SETTINGS}/srtforpm_p3.stx"... (8 Replies)
Discussion started by: sonu_pal
8 Replies

8. Shell Programming and Scripting

Executing 'exit' command from shell script

Hi, I am writing shell script to automate few use cases for CLI interface. We have CLI interface which has bunch of commands. I am trying to execute one of the commands 'exit' as part of automation to exit from CLI object (not from shell script) in my shell script. My intension is to execute... (4 Replies)
Discussion started by: Mahesh Desai
4 Replies

9. HP-UX

Find command doesn't return in shell script.

Hi All, I am using below snippet to search for a string (read from a file 'searchstring.out') in all locations (/) and then iterate over the files found to write the locations and the respective owner to an output file. However, this doesn't work as I believe the find command doesn't exit's... (11 Replies)
Discussion started by: Vipin Batra
11 Replies

10. UNIX for Beginners Questions & Answers

Linux shell | how to exit a script if any command fails.

Hi, i am new here let me say HI for all. now i have a question please: i am sending one command to my machine to create 3 names. if one of the names exists then the box return error message that already have the name but will continue to create the rests. How i can break the command and... (7 Replies)
Discussion started by: Amiri
7 Replies
AXCTL(8)						   Linux System Managers Manual 						  AXCTL(8)

NAME
axctl - Configure/Kill running AX.25 connections. SYNOPSIS
axctl [-v] port dest src window|t1|t2|t3|n2|idle|paclen|kill [parm] DESCRIPTION
The axctl command is designed to be a multi-function command that allows miscellaneous commands to be issued to the Linux AX.25 protocol layer for existing AX.25 connections. The connection is uniquely identified via the combination of port, destination callsign and source callsign, with that information the kernel is able to change the parameters, or abort the connection. Many of the options are similar to those found in axparms and perform the same function. Only one parameter may be changed on each invoka- tion of axctl. OPTIONS
-v Displays the version number. window window Sets the window size for the AX.25 connection. t1 t1-timeout Sets the initial T1 timeout value for the AX.25 connection, the value is given in seconds. t2 t2-timeout Sets the T2 timeout value for the AX.25 connection, the value is given in seconds. t3 t3-timeout Sets the T3 timeout value for the AX.25 connected, the value is given in seconds. n2 n2-count Sets the maximum number of tries for the AX.25 connection. idle idle-timeout Sets the value for the idle timer for the AX.25 connection, the value is in minutes. paclen paclength Sets the maximum packet length that may be transmitted on the AX.25 connection. kill Will abort an existing AX.25 connection. FILES
/etc/ax25/axports SEE ALSO
call(1), getsockopt(2), setsockopt(2), ax25(4), axparms(8), axports(5). AUTHORS
Joerg Reuter DL1BKE <jreuter@poboxes.com> Linux 2 August 1996 AXCTL(8)
All times are GMT -4. The time now is 02:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy