![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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. |
|||
| Google The UNIX and Linux Forums |