Home > OS >  Many good script calls, or call a function better?
Many good script calls, or call a function better?

Time:10-28

Learned a shell script is a bit of time, also met many problems during,

Wish to discuss with you today, for a slightly more complex task, certainly is not a simple command line can be solved, modular is indeed a good method, but if multiple scripts call each other, for some repetitive variables need to be redefined in each script, feel a little redundant, but write a small function function, and then calls the function, the code is all in a script, although have solved the problem of variable definitions, but the code in a shell, isn't it a bit too long,

I also know that using bash call the script, the father of the bash variable in child bash is failure, but use the source and. Execute permissions can solve in theory, but the effect is not particularly evident in the process of field, the whole dizzy, all on my own

Seek predecessors advice...
  • Related