Script OS *******************executie script********* bash script.sh *********** exemple script **************** #!/bin/bash echo "naut, mess, skype" azureus & pidgin & skype & echo "gata" ******************************************* #!/bin/bash #!echo "pagina dorita: " #!read varPG declare varPG=108 cd /mnt/ntfs/daniel/carti djview3 -page $varPG Classical\ Mechanics\ -\ Systems\ of\ Particles\ and\ Hamiltonian\ Dynamics\ -\ W.\ Greiner.djv & djview3 -page $varPG Classical\ Mechanics\ -\ Systems\ of\ Particles\ and\ Hamiltonian\ Dynamics\ -\ W.\ Greiner.djv & cd ~ ***************************************** #!/bin/bash ifconfig eth0 down hw ether 00:07:E9:E5:9A:?? ifconfig eth0 up service network start ***************************************** - & = pentru a pune un proces, aplicatie in background; astfel se elibereaza prompterul shelului. Ex: acroread using.pdf & - | = Pipe operator -> combines input and output redirection so that the output of one command is immediately used as the input for another. Ex: ls -lh | more - comanda < fisier = redirectioneaza outputul comenzii spre un fisier - comanda << fisier = appends the new data to the end of the file - Command Substitution = another way of using the output of one command as an argument to another. Ex: ls $(pwd) <-> pwd | ls The construction using the $ operator is distinctive in that the command in parentheses is executed in a subshell. Instead of using the $() construction, you can also use backticks. Ex: ls `pwd` - gnome-terminal = to launch a new terminal