The UNIX and Linux Forums  

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
To call/execute a shell script from a shell script konark UNIX for Dummies Questions & Answers 1 10-26-2007 02:16 PM
How to pass a parameter from one Shell-script to another Shell-script subodhbansal Shell Programming and Scripting 2 09-22-2007 02:19 AM
How to Run a shell script from Perl script in Parent shell? hifake Shell Programming and Scripting 16 08-28-2007 05:42 PM
Accessing variables of one shell script in another shell script rsendhilmani Shell Programming and Scripting 1 04-30-2007 05:43 AM
Have a shell script call another shell script and exit heprox Shell Programming and Scripting 2 11-20-2006 05:17 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 03-14-2006
Registered User
 

Join Date: Apr 2005
Posts: 42
shell script

Hi All,

I am having one file say ABC where i a defining all the variable like as follows:

name1=gauri
name2=sandeep
name3=mishra

Now i am using one shell script say xyz.sh where i am using ABC file as :

export ABC

$DEBUG "ABC: load_section [globals]"

function load_section
{
typeset section

${HAVE_BINIFILE:-true} || return
[[ -n "$ABC" ]] || oops "load_section: ABC is empty string"
[[ -f "$ABC" ]] || oops "load_section: File not found: $ABC"

section="${1:-$SCRIPT}"
...
....
...
}


I am unable to understand the meaning of export here. I know why we use export but here i didnt undertsnad.

And what is this $DEBUG doing ...I am a new bie for shell script

Thanks & Regards
Gauri
Reply With Quote
Forum Sponsor
  #2  
Old 03-15-2006
Registered User
 

Join Date: Mar 2006
Location: Mumbai,India
Posts: 57
Cool

Hi
I think ABC are variables. and these variables are declared in your
dot profile file or
in your home or global directoy.

and for rest questions?? we need to wait for any experts answer.
as i m also new to linux world.
Reply With Quote
  #3  
Old 03-17-2006
Registered User
 

Join Date: Jan 2006
Posts: 59
Guari,
This is what I think..
From Unix man pages:

export is a shell built-in function that determines the characteristics for environmental variables of the current shell and its descendants.

**export [name =[value] ]...
In your script, what I understand, is you're trying to pass the file ABC to the load_section function which determines its type -- whether it's an empty string on a file (-f option).

I'm not sure of the $DEBUG.

Again, correction are welcome!
Sirisha

Last edited by manthasirisha; 03-17-2006 at 02:57 AM. Reason: spelling error
Reply With Quote
  #4  
Old 03-17-2006
Registered User
 

Join Date: Dec 2005
Location: London
Posts: 222
Seems like $DEBUG is a function or command name to print either to screen or file... like it can be echo or print statement or something else

Just do echo $DEBUG to know what value was set in it...

It should have been assigned in environment or profile settings file.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0