Sponsored Content
Top Forums Shell Programming and Scripting Force Input in User Defined Variable Post 302122366 by Shell_Life on Wednesday 20th of June 2007 08:35:31 AM
Old 06-20-2007
>>>What does "does not work" mean?
Means if a valid number between 1 and 30 is entered,
the solution will say it is invalid.

>>>What happens?
It continues in the loop.

>>>What error messages do you get?
Invalid number: "1"
Please try again.

>>>What input causes it to fail?
The normal, valid case of a number between 1 and 30.
 

10 More Discussions You Might Find Interesting

1. AIX

User defined signal 1

Hi, I am just running a incremental back-up on one of my server. But these days It abrubtly fails with below error. ========== User defined signal 1 =========== When I rerun the back-up, It completed successfully.Earlier this was not happening. Any Idea, what could be the problem... (0 Replies)
Discussion started by: nitesh_raj
0 Replies

2. UNIX for Dummies Questions & Answers

User defined service

I want to add a new IP service which executes a script on SCO OS5. I have amended /etc/services and added to port number (3333) I have amended /etc/inetd.conf and added a line for this service but I can't get it to execute my own shell script When I telnet to the IP address on port 3333 I... (1 Reply)
Discussion started by: markdrury
1 Replies

3. Linux

environment variable is not defined

moved to correct thread (0 Replies)
Discussion started by: alien12
0 Replies

4. Shell Programming and Scripting

Replace variable with a user defined variable

I have a file that has a list of entries in a column x z z z x y z The column can have any length and any number of any strings. I need to replace each unique string with a user defined number. I can filter the unique entries out using awk '{if (NF==5) print $2}' file | uniq | nl >... (1 Reply)
Discussion started by: ce124
1 Replies

5. Shell Programming and Scripting

need help with User Defined Function

Dear Friends, I need a help regarding User defined function in shell script. My problem is as follows: my_func.sh my_funcI(){ grep 'mystring' I.dat } my_funcQ(){ grep 'mystring' Q.dat } myfuncI myfuncQ But As both the function has same function only the... (11 Replies)
Discussion started by: user_prady
11 Replies

6. Shell Programming and Scripting

Unable to add user defined variable

Hi, I have a user defined variable _TIME1=xxx I am using awk command for pattern matching. cat $_LOCATION/catalina.txt | awk '/^`$_TIME1`:??:??/' It not taking the value of $_TIME! eg:I am using the command to get all the patter from 12:00:00 to 12:59:59 The user defined variable... (2 Replies)
Discussion started by: ahamed
2 Replies

7. UNIX for Dummies Questions & Answers

user defined commands

Hi, i would like to create user defined commands. e,g: if an user executes , mkdircd test then a directory called test should be created and it should be cd to test. How i can create the command mkdircd with below action: mkdir $1 && cd $1. Please help me in achieving this (7 Replies)
Discussion started by: pandeesh
7 Replies

8. UNIX for Dummies Questions & Answers

print user variable input

this may be basic thing for everyone here, but i cant push awk to print the variable user input which is INS, please help. code: INS=$1 printf '\n' symdg list | grep $INS-clone | awk -v i=$INS '{ID=substr($4,9,4)}{print "Device Group: "$1,"at Array "ID,i}' output: $ ./test.sh patty ... (5 Replies)
Discussion started by: prodigy06
5 Replies

9. Shell Programming and Scripting

Question about awk - create a user-defined variable

Hi, guys, The content of file is below (from <UNIX® Shells by Example Fourth Edition>): My code is below: gawk -F'' ' { OFS = "****"; $3 = "(904)"; $8 = $5 + $6 + $7; print } ' lab3.data The result is below: So, where is the $1? Why is the variable $8 located at the wired position? (3 Replies)
Discussion started by: franksunnn
3 Replies

10. Shell Programming and Scripting

Doing math using user defined input and system environment variables

Hi, I need some help to setup some environmental variables. for example...Get A -> userdefined/user input B -> a number. c -> system variable...for example $GETCONF PAGE_SIZE E = do some math using bc display a message "The value is E" setup the system/kernel paramter sysctl -p... (3 Replies)
Discussion started by: saravanapandi
3 Replies
xpaaccess(3)							SAORD Documentation						      xpaaccess(3)

NAME
XPAAccess - return XPA access points matching template (XPA 2.1 and above) SYNOPSIS
#include <xpa.h> int XPAAccess(XPA xpa, char *template, char *paramlist, char *mode, char **names, char **messages, int n); DESCRIPTION
The XPAAccess routine returns the public access points that match the specified second argument template and have the specified access type. A template of the form "class1:name1" is sent to the XPA name server, which returns a list of at most n matching XPA servers. A connection is established with each of these servers and the paramlist string is passed to the server as the data transfer request is initiated. If an XPA struct is passed to the call, then the persistent connections are updated as described above. Otherwise, temporary connections are made to the servers (which will be closed when the call completes). The XPAAccess() routine retrieves names from at most n XPA servers that match the specified template and that were checked for access using the specified mode. The return string contains both the class:name and ip:port. If a given server returned an error or the server call- back sends a message back to the client, then the message will be stored in the associated element of the messages array. NB: if speci- fied, the name and messages arrays must be of size n or greater. The returned message string will be of the form: XPA$ERROR error-message (class:name ip:port) Note that names of matching registered access points are always returned but may not be valid; it is not sufficient to assume that the returned number of access points is the number of valid access points. Rather, it is essential to check the messages array for error mes- sages. Any string in the messages array is an error message and indicated that the associated access point is not available. For example, assume that a server registers a number of access points but delays entering its event loop. If a call to XPAAccess() is made before the event loop is entered, the call will timeout (after waiting for the long timeout period) and return an error of the form: XPA$ERROR: timeout waiting for server authentication (XPA:xpa1) The error means that the XPA access point has been registered but is not yet available (because events are not being processed). When the server finally enters its event loop, subsequent calls to XPAAccess() will return successfully. NB: This routine only works with XPA servers built with XPA 2.1.x and later. Servers with older versions of XPA will return the error mes- sage: XPA$ERROR invalid xpa command in initialization string If you get this error message, then the old server actually is ready for access, since it got to the point of fielding the query! The xpaaccess program, for example, ignores this message in order to work properly with older servers. The third argument for XPAAccess() is the type of access and can be any combination of: type explanation ------ ----------- g xpaget calls can be made on this access point s xpaset calls can be made on this access point i xpainfo calls can be made on this access point The mode string argument is of the form: "key1=value1,key2=value2,..." The following keywords are recognized: key value default explanation ------ -------- -------- ----------- ack true/false true if false, don't wait for ack from server (after callback completes) The ack keyword is not very useful, since the server completes the callback in order to return the data anyway. It is here for completion (and perhaps for future usefulness). SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xpaaccess(3)
All times are GMT -4. The time now is 07:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy