Sponsored Content
Top Forums Shell Programming and Scripting Code that has to end no matter what Post 303022472 by drysdalk on Saturday 1st of September 2018 10:50:07 AM
Old 09-01-2018
Hi,

One modification you could make here would be to change the line defining maxruntime to this instead:

Code:
maxruntime=$1

The variable $1 has a special meaning referring to the first command-line parameter passed into the script. So for a ten-second timeout, you could then run the script by typing script.sh 10, and when the script ran maxruntime would take the definition of the first parameter passed to the script - 10, in this case.
 

5 More Discussions You Might Find Interesting

1. Linux

Need help with this matter

I have a PC that was built in Europe pre-installed with Windows 2000. The HDD is 40GB, but, its split up as two 20GB (Taken up by Windows). I want to take over my Mandrake 9.1 CDs and install Linux on that machine. My question is, how would I proceed to install Linux this way??? Now, If... (1 Reply)
Discussion started by: wardialer
1 Replies

2. Shell Programming and Scripting

How to delete matter in between two lines

help I am having text file like this... ------------------------END OF UPDATION ------------------ xxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyy yyyyyyyyyyyyyyyyyyyyy 1 row updated ------------------------END OF UPDATION ------------------ TTTTTTTTTTTTTTTT FFFFFFFFFFFFFFFFF ... (3 Replies)
Discussion started by: suryanarayana
3 Replies

3. Shell Programming and Scripting

Terminal to the front no matter what

Is there a way to bring the terminal script to the front? I am running this script through OMCEdit which is then running it through Terminal. I have some dialog boxes (using osascript) and the dialog boxes are not coming to the front...Terminal bounces and I have to click on Terminal to see the... (1 Reply)
Discussion started by: mainegate
1 Replies

4. Shell Programming and Scripting

grep matter between braces

#include<header.h> void classname :: pvvd_init ( abcd ,efgh ,ijkl ,mnop ) { rvcl_tabl_name_tabl.pvvd_init ( xxxx ,"tabl_mame" ) ; ... (2 Replies)
Discussion started by: ultimatix
2 Replies

5. UNIX for Dummies Questions & Answers

Strange system activity no matter what I try

When I choose to encrypt my drive during a Linux install, it encryps it, but I receive errors in dmesg and in ~/.xsessions-errors during use. The first error is in dmesg where it sometimes shows errors writing to the encypted device. The second error is in ~/.xsessions-errors with an error about... (0 Replies)
Discussion started by: justgoogleit
0 Replies
CPU(1)							      General Commands Manual							    CPU(1)

NAME
cpu - connection to cpu server SYNOPSIS
cpu [ -h server ] [ -c cmd args ... ] DESCRIPTION
Cpu starts an rc(1) running on the server machine, or the machine named in the $cpu environment variable if there is no -h option. Rc's standard input, output, and error files will be /dev/cons in the name space where the cpu command was invoked. Normally, cpu is run in an 81/2(1) window on a terminal, so rc output goes to that window, and input comes from the keyboard when that window is current. Rc's cur- rent directory is the working directory of the cpu command itself. The name space for the new rc is an analogue of the name space where the cpu command was invoked: it is the same except for architecture- dependent bindings such as /bin and the use of fast paths to file servers, if available. If a -c argument is present, the remainder of the command line is executed by rc on the server, and then cpu exits. The name space is built by running /usr/$user/lib/profile with the root of the invoking name space bound to /mnt/term. The service envi- ronment variable is set to cpu; the cputype and objtype environment variables reflect the server's architecture. FILES
The name space of the terminal side of the cpu command is mounted on the CPU side on directory /mnt/term. SOURCE
/sys/src/cmd/cpu.c SEE ALSO
rc(1), 81/2(1) BUGS
Binds and mounts done after the terminal lib/profile is run are not reflected in the new name space. CPU(1)
All times are GMT -4. The time now is 06:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy