if n.sh doesn't contain anything but functions and variables (i.e. no actual executed code) then add ". /n.sh" to the top of n1.sh. If n.sh is a full functional script, then you cannot do this. If you have common functions that you wish to use over multiple scripts, then place these functions into their own file (preferable without a "#!" line at the top). In this way, every script that wants to use those functions can include them using the "." line presented earlier.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
Debugging code is twice as hard as writing it, so
by definition, if you code to the best of your ability,
you are not capable of debugging it.
(I don't remember who it was that said this or I would
acknowledge him.)
http://cboard.cprogramming.com/member.php?u=5094
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
I can't read that link (I am not a member of that site so it simply brings me to a login page).
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
From Dave_Sinulka's signature (CBoard member):
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339