Sponsored Content
Full Discussion: Nested If condition
Top Forums Shell Programming and Scripting Nested If condition Post 302465418 by magesh_bala on Friday 22nd of October 2010 11:08:15 AM
Old 10-22-2010
Still I face the same problem.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

nested variables

Is there any way to do variable nesting using sh? For example: example_1="a test string" example_2="another test" example_3="etc..." i=2 echo ${example_$i} The shell reports: sh: ${example_$i}: bad substitution If not, maybe someone could suggest another method. Thanks in... (3 Replies)
Discussion started by: kevinl33
3 Replies

2. HP-UX

Difference between [condition] and [[condition]] and ((condition)) when used with if condition

Executed the following if conditions .. and got different results . only (( )) gave correct o/p with all scenarios . Can anybody please let me know what is the difference between and ] and ((condition)) when used with if condition. And why each condition gave different result. 1.... (2 Replies)
Discussion started by: soumyabubun
2 Replies

3. Shell Programming and Scripting

Nested if in KSH

Trying to clean up the last little thing in this script which is that the mv always performs no matter whether it is needed or not. It doesn't cause any bugs just prints an unsightly "can't mv source and dest are the same". Obviously I want to get rid of it but having issues getting the... (4 Replies)
Discussion started by: Calbrenar
4 Replies

4. Shell Programming and Scripting

redirect stdout echo command in condition A run in condition B

hi, I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command Here are my simple script After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
Discussion started by: jao_madn
3 Replies

5. Shell Programming and Scripting

Nested if else

Hi, i m trying to create script which logic is like below. if ; then x=`cat /tmp/testoutput.log | grep STOP | wc -l` y=`cat /tmp/testoutput.log | grep RUN | wc -l` if ; then echo "process stop" if ; then echo "process running " else echo "file not found" fi ----------------... (2 Replies)
Discussion started by: tapia
2 Replies

6. Shell Programming and Scripting

If condition return 0 even when it fails to satisfy te condition

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)
Discussion started by: Priya Amaresh
2 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Nested If

I am having a problem with a nested if. I am sure I am overlooking something. I check for the existence of $Pidfl3 and it exists, o this condition I then want to check for the existence of a next file and remove it. The first if is executed, but on the second if I get test: argument expected. My... (4 Replies)
Discussion started by: Charles Swart
4 Replies

8. Shell Programming and Scripting

How to add second variable in awk nested if condition?

Hi Gurus, I have a command to assign value based on input value. current condition is "if pattern matches "case", then assign "HOLD" else "SUCC"right now, I need to add one more condition (variable name is VAR). the condition is "if pattern1 matches "case", then assign "HOLD" else if... (2 Replies)
Discussion started by: ken6503
2 Replies
GENCLOCK(1)						      General Commands Manual						       GENCLOCK(1)

NAME
genclock - generate a RADIANCE description of a clock SYNOPSIS
genclock [ -f face_mat ][ -c case_mat ][ -n name ] { HH:MM | hours } DESCRIPTION
Genclock produces a RADIANCE scene description of an analog clock showing the given hour. The hour may either be given as HH:MM or decimal hours. The face of the clock will have a radius of 1.0 units, with the surrounding case 1.1 (2.2 diameter). The origin is at the center of the back, and the face looks in the positive X-direction. The 12 o'clock direction corresponds to the positive Z-axis. (The Y-axis direction is 3 o'clock.) The xform(1) command may be used to resize and relocate the clock as desired. Normally, genclock produces all of the materials necessary for its own description, but options are provided to specify alternate materials for the face and case. The numbers on the face are in dark lettering, so the face material must be relatively light for them to show up well. By default, the clock is given the name "clock," but this may be changed with the -n option. EXAMPLE
To produce a 12 inch diameter clock showing 10:35 and hang it at 60 on a wall facing the Y-direction at Y=10: genclock 10:35 | xform -s 6 -rz 90 -t 20 10 60 AUTHOR
Greg Ward SEE ALSO
genrbox(1), genrev(1), gensurf(1), genworm(1), rpict(1), rvu(1), xform(1) RADIANCE
4/9/97 GENCLOCK(1)
All times are GMT -4. The time now is 10:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy