09-14-2004
Accept input parameters
Dear All,
I got a table creation file in a standard format. I need to accept parameters from the user & then based on the input change the data in the file. For. eg. i will accept the database name, dbspace name & user name from the user and accordingly change the same in the table creation file. Any ideas???.
Thanks in advance.
Regards,
lloyd
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a situation where I want the user to enter only numbers in response to a READ command. I have some validation to restrict the number to be between 1 and 12, but if the user type in some characters the script echoes some error message and goes to the next command. Below is a snippet of the... (1 Reply)
Discussion started by: pvar
1 Replies
2. Shell Programming and Scripting
hi,
am a new learner to shell programming.
i have a script which will prompt for user to key in their name & display their name afterwards.
script
=====
echo "Pls enter your name:"
read name
echo "Your name is $name."
output
=====
Pls enter your name:
Bob
Your name is Bob.
what... (2 Replies)
Discussion started by: newbie168
2 Replies
3. UNIX for Dummies Questions & Answers
I am trying to write a one line command for Oracle grid control. I am using a semi-colon to separate the commands. But, I am having a problem with a shell script accepting input. Wondering if you can help.
Here is what I am trying to do:
(PGPRD5432)@prd01:/> cd /export/home/postgres ##... (3 Replies)
Discussion started by: rexmabry
3 Replies
4. UNIX for Dummies Questions & Answers
how would i accept user input from the keyboard? (2 Replies)
Discussion started by: JamieMurry
2 Replies
5. Shell Programming and Scripting
Hi All,
I am trying to write a script in which I need to accept multiple value in the same variable.
The case Is that I have put a FOR loop and inside the FOR loop I am accepting a variable value. And I require all the values which gets inputted in the variable.
To be... (5 Replies)
Discussion started by: rahulmittal87
5 Replies
6. Shell Programming and Scripting
Dear All,
The sqlplus 'Accept' command is not waiting for user input when I include the command within a shell script.
Note: The 'Accept' command is working fine if I execute it in a SQLPLUS Prompt.
Please fins the below sample script which i tried.
SCRIPT:
--------
#!... (4 Replies)
Discussion started by: little_wonder
4 Replies
7. Programming
Hi
I want to accept multiple lines input with spaces from User and i have a working code like this.
char sRes;
char sReq;
printf("Please enter request:");
scanf("%",sReq); /* Accept the input from user */
printf("\nPlease enter response:");
scanf("%",sRes);
but the... (4 Replies)
Discussion started by: AAKhan
4 Replies
8. Shell Programming and Scripting
echo (some info) read? <&1(not working for me) (1 Reply)
Discussion started by: robin_simple
1 Replies
9. Shell Programming and Scripting
I want a shell script that accepts user input simultaneously when performing other tasks. Example: A shell script should echo some messages on the console and when the user presses some keys it should respond to that action.
say, when user presses the key
A - more information should be printed... (2 Replies)
Discussion started by: Arun_Linux
2 Replies
10. UNIX for Dummies Questions & Answers
Just for my leaning purpose, I appreciate if someone answer my question:
A UNIX script can accept 1 to n parameters. For each of these parameters, write out the parameter id number and its value. (1 Reply)
Discussion started by: shumail
1 Replies
LEARN ABOUT LINUX
overload
overload(3erl) Erlang Module Definition overload(3erl)
NAME
overload - An Overload Regulation Process
DESCRIPTION
overload is a process which indirectly regulates CPU usage in the system. The idea is that a main application calls the request/0 function
before starting a major job, and proceeds with the job if the return value is positive; otherwise the job must not be started.
overload is part of the sasl application, and all configuration parameters are defined there.
A set of two intensities are maintained, the total intensity and the accept intensity . For that purpose there are two configuration param-
eters, the MaxIntensity and the Weight value (both are measured in 1/second).
Then total and accept intensities are calculated as follows. Assume that the time of the current call to request/0 is T(n) , and that the
time of the previous call was T(n-1) .
* The current total intensity , denoted TI(n) , is calculated according to the formula,
TI(n) = exp(-Weight*(T(n) - T(n-1)) * TI(n-1) + Weight ,
where TI(n-1) is the previous total intensity.
* The current accept intensity , denoted AI(n) , is determined by the formula,
AI(n) = exp(-Weight*(T(n) - T(n-1)) * AI(n-1) + Weight ,
where AI(n-1) is the previous accept intensity, provided that the value of exp(-Weight*(T(n) - T(n-1)) * AI(n-1) is less than MaxInten-
sity ; otherwise the value is
AI(n) = exp(-Weight*(T(n) - T(n-1)) * AI(n-1) .
The value of configuration parameter Weight controls the speed with which the calculations of intensities will react to changes in the
underlying input intensity. The inverted value of Weight ,
T = 1/Weight
can be thought of as the "time constant" of the intensity calculation formulas. For example, if Weight = 0.1 , then a change in the under-
lying input intensity will be reflected in the total and accept intensities within approximately 10 seconds.
The overload process defines one alarm, which it sets using alarm_handler:set_alarm(Alarm) . Alarm is defined as:
{overload, []} :
This alarm is set when the current accept intensity exceeds MaxIntensity .
A new overload alarm is not set until the current accept intensity has fallen below MaxIntensity . To prevent the overload process from
generating a lot of set/reset alarms, the alarm is not reset until the current accept intensity has fallen below 75% of MaxIntensity , and
it is not until then that the alarm can be set again.
EXPORTS
request() -> accept | reject
Returns accept or reject depending on the current value of the accept intensity.
The application calling this function should be processed with the job in question if the return value is accept ; otherwise it
should not continue with that job.
get_overload_info() -> OverloadInfo
Types OverloadInfo = [{total_intensity, TotalIntensity}, {accept_intensity, AcceptIntensity}, {max_intensity, MaxIntensity},
{weight, Weight}, {total_requests, TotalRequests}, {accepted_requests, AcceptedRequests}].
TotalIntensity = float() > 0
AcceptIntensity = float() > 0
MaxIntensity = float() > 0
Weight = float() > 0
TotalRequests = integer()
AcceptedRequests = integer()
Returns the current total and accept intensities, the configuration parameters, and absolute counts of the total number of requests,
and accepted number of requests (since the overload process was started).
SEE ALSO
alarm_handler(3erl), sasl(3erl)
Ericsson AB sasl 2.1.9.3 overload(3erl)