The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Check existence of a login xavier054 UNIX for Advanced & Expert Users 10 03-06-2008 11:19 AM
Csh to check for existence of file Raynon Shell Programming and Scripting 9 12-05-2007 09:20 PM
How to check the file existence using shell scripting in Solaris-10 krevathi1912 SUN Solaris 2 11-26-2007 05:07 AM
check for FILES existence mpang_ Shell Programming and Scripting 3 06-28-2006 06:51 AM
How to check parameter variable? negixx Shell Programming and Scripting 4 06-10-2005 05:37 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 12-05-2006
samit_9999 samit_9999 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 21
Variable check for existence ?

Hi ,

I have a script wherein i have a For Loop.
Within this for loop i create a variable and assign it a value.

The script goes to a For Loop only if certain conditions are met , which means the variable may or may not exists.

However down the line in the script i have to check if that variable exists on or not.

How do i check this

I tried this but the script fails with the following error "Specify a parameter with this command."
if [ -s ${FILE_LIST} ]
then
echo "Variable Exist"
fi

Please help

Sam
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:19 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0