Δημοσιεύτηκε: 14 Οκτ 2009, 10:26
da_perama1 έγραψε:Πάντως μου έμεινε η απορία γιατί δεν δουλεύει το script.
http://tldp.org/LDP/Bash-Beginners-Guid ... 01_03.html
έγραψε:1.3.1. General
Bash determines the type of program that is to be executed. Normal programs are system commands that exist in compiled form on your system. When such a program is executed, a new process is created because Bash makes an exact copy of itself. This child process has the same environment as its parent, only the process ID number is different. This procedure is called forking.
...
...
...
1.3.3. Executing programs from a script
When the program being executed is a shell script, bash will create a new bash process using a fork. This subshell reads the lines from the shell script one line at a time. Commands on each line are read, interpreted and executed as if they would have come directly from the keyboard.
While the subshell processes each line of the script, the parent shell waits for its child process to finish. When there are no more lines in the shell script to read, the subshell terminates. The parent shell awakes and displays a new prompt.