If $back_home is not defined then the command cd ${back_home} would evaluate to just cd (since "back_home" would evaluate to nothing). This would indeed take you "back home" (as in to your home directory - since cd with no arguments is equivalent to cd $HOME).
If you want to test if a variable is defined, you should use the test command!
hi ..
I have automate some process on unix through sehll script .
but i don't know there is some problem in scripts, some time shell script works and some time it fails. so my query is that "Why shell script fails some times?"
thanks (4 Replies)
hi ,
i m trying to run a shell script automatically , some time it works fine but some time it fails , what could be the problem .
If anybody have an idea about this problem then reply .
Thanks in advacne (4 Replies)
Guys any tips on printing a certain error message to stderr and exiting should a command fail within a ksh script? I'm trying to null some output files.
Touch isn't suitable as i need to null them.
print "" > file isn't suitable as i need to check elsehere for if they are 0bytes or not.
... (5 Replies)
Hi All,
I am stuch in a script where a for loop is running to execute some commands for some values.
Now my problem is i have to have an if condition that if the first iteration is successful then it has to exit the for loop otherwise it has to continue normally.
my code is this:
for... (5 Replies)
OS Environment: HP-UX B.11.31 U ia64
I am using the shell script code to connect to Oracle RAC database.
Passing the parameter of cluster database name.
typeset -l DB_ID=$1
+ typeset -l DB_ID=sivDB
#---- 3. SetDB validation -------------
if ; then
print... (3 Replies)
HI
My doubt may be basic one but I need to get it clarified..
When i use "if" condition that checks for many AND, OR logical conditions
like
if ]; then
return 0
fi
Even the if condition fails it returns as zero.. Any clue..
But if i add else condition like
if ]; ... (2 Replies)
Hi,
I am writing a menu driven program using shell script. THe script will be collecting data by logging into the other servers and bringing back the data to home server to process it and accordingly issue commands. TO automate commands execution , I am using expect script. However I am not able... (5 Replies)
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)
I have a sample server name listed in variable as below:
var="server-13"
I need to check if the 7th character on $var is number 1
whichenv=`echo "$var"| head -c 7 | tail -c 1`
if ]; then
echo "9 found"
else
echo "9 Not Found"
fi
Output:
This works... (3 Replies)
Discussion started by: mohtashims
3 Replies
LEARN ABOUT XFREE86
glevalpoint1
GLEVALPOINT(3G)GLEVALPOINT(3G)NAME
glEvalPoint1, glEvalPoint2 - generate and evaluate a single point in a mesh
C SPECIFICATION
void glEvalPoint1( GLint i )
void glEvalPoint2( GLint i,
GLint j )
PARAMETERS
i Specifies the integer value for grid domain variable i.
j Specifies the integer value for grid domain variable j (glEvalPoint2 only).
DESCRIPTION
glMapGrid and glEvalMesh are used in tandem to efficiently generate and evaluate a series of evenly spaced map domain values. glEvalPoint
can be used to evaluate a single grid point in the same gridspace that is traversed by glEvalMesh. Calling glEvalPoint1 is equivalent to
calling
glEvalCoord1( i./u+u1 );
where
/u=(u2-u1)/n
and n, u1, and u2 are the arguments to the most recent glMapGrid1 command. The one absolute numeric requirement is that if i=n, then the
value computed from i./u+u1 is exactly u2.
In the two-dimensional case, glEvalPoint2, let
/u=(u2-u1)/n
/v=(v2-v1)/m,
where n, u1, u2, m, v1, and v2 are the arguments to the most recent glMapGrid2 command. Then the glEvalPoint2 command is equivalent to
calling
glEvalCoord2( i./u+u1, j./v+v1 );
The only absolute numeric requirements are that if i=n, then the value computed from i./u+u1 is exactly u2, and if j=m, then the value
computed from i./v+v1 is exactly v2.
ASSOCIATED GETS
glGet with argument GL_MAP1_GRID_DOMAIN
glGet with argument GL_MAP2_GRID_DOMAIN
glGet with argument GL_MAP1_GRID_SEGMENTS
glGet with argument GL_MAP2_GRID_SEGMENTS
SEE ALSO glEvalCoord(3G), glEvalMesh(3G), glMap1(3G), glMap2(3G), glMapGrid(3G)GLEVALPOINT(3G)