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 > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
undefined symbol: clock_gettime' error dpa078 High Level Programming 4 04-09-2008 09:29 AM
undefined error amitrajvarma Shell Programming and Scripting 1 01-11-2008 07:32 AM
Prompting for Input - Getting Undefined Variable Kartheg UNIX for Dummies Questions & Answers 1 06-27-2007 05:24 PM
Undefined reference to Error svh High Level Programming 2 02-11-2006 12:23 AM
ld: 0711-317 ERROR: Undefined symbol: .hello stockdan High Level Programming 2 11-25-2003 05:43 AM

 
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 05-19-2008
c00kie88 c00kie88 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 63
undefined variable error

Hi all,

i have a script.

When i run the script, on the prompt i use: $> . ./blah; i have an undefined variable error.

But when i run the script using $> ./blah ; it works fine.

I know it was something to do with FORK() process.

But i have a simple script , using while loop.

#!/bin/sh

answer=0

while [ "$answer" -gt 10 ];

do

echo "Hello"

done

It's complaining my "answer" variable.

How to fix the problem? Do i need to use PATH?

Please help
 

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 09:29 PM.


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