Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

csh if loop variable condition check peroblem

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 11-06-2009   -   Original Discussion by vasanth.vadalur
vasanth.vadalur vasanth.vadalur is offline
Registered User
 
Join Date: Oct 2008
Last Activity: 22 December 2015, 7:03 AM EST
Posts: 64
Thanks: 6
Thanked 0 Times in 0 Posts
csh if loop variable condition check peroblem

Hi,


I have variables like

Code:
var1
var2
var3
var4

in

if loop i am trying to check the condition

Code:
if(variable == "var[1-4]") then
echo $variable 
endif

My main doubt is how to compare the var variable, which is having digit at the end.

Thanks in advance
vasanth
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to break a loop if condition is met Issemael Shell Programming and Scripting 9 07-19-2009 06:59 AM
using flag inside a for loop to check condition codeman007 Shell Programming and Scripting 4 01-13-2009 04:30 PM
how can i put the condition in for loop for the below. mail2sant Shell Programming and Scripting 1 04-28-2008 05:49 AM
Testing For Loop condition mavsman UNIX for Dummies Questions & Answers 4 04-01-2008 12:45 PM
What condition to be put in the while loop? nehaquick UNIX for Dummies Questions & Answers 1 02-15-2008 04:06 PM



All times are GMT -4. The time now is 05:14 PM.