Herramientas de usuario

Herramientas del sitio


informatica:certificaciones:lpic:lpic-1:105_shells_and_shell_scripting

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
informatica:certificaciones:lpic:lpic-1:105_shells_and_shell_scripting [2022/04/19 10:34] – [PARTE II] tempwininformatica:certificaciones:lpic:lpic-1:105_shells_and_shell_scripting [2022/04/19 10:41] (actual) – [Test] tempwin
Línea 111: Línea 111:
 fi fi
 </code> </code>
 +
 +===== Test =====
 +
 +**Every shell script intended to run within a bash environment, should have what identifier at the top of the script file?** 
 +
 +  * ''#/bin/bash''
 +  * ''!/bin/bash''
 +  * ''!#/bin/bash''
 +  * ''#!/bin/bash'' (**solución**) 
 +
 +**Of the following conditional statements within a shell script, which one will test for the existence of a file called 'mytest.txt' in the current directory?**
 +
 +  * ''if [[$FILE is 'mytest.txt' ]];then''
 +  * ''if [[ $1='mytest.txt' ]];then''
 +  * ''if [[ -f mytest.txt ]];'' (**solución**) 
 +  * ''if [[ filename='mytest.txt' ]]; then''
 +
 +**What user script (if it exists) is run, from a user's home directory, every time they log into a system? (select 2)**
 +
 +  * ''~/.bash_profile'' (**solución**) 
 +  * ''/etc/rc.local''
 +  * ''/etc/rc.local''
 +  * ''~/.bashrc'' (**solución**) 
 +
 +**Which of the following special shells that, when assigned to a user account as the default shell, will prevent that account from being able to log in? (Choose the 2 correct answers)**
 +
 +  * ''. /etc/users.deny''
 +  * ''/sbin/nologin'' (**solución**) 
 +  * ''/etc/users.allow''
 +  * ''/bin/false'' (**solución**) 
 +
 +**Which of the following variable definitions will be available to subshells in the environment?**
 +
 +  * ''export MYVAR="Some Value"'' (**solución**) 
 +  * ''MYVAR="Some Value"''
 +  * ''env MYVAR="Some Value"''
 +  * None of the Above
 +
informatica/certificaciones/lpic/lpic-1/105_shells_and_shell_scripting.1650357281.txt.gz · Última modificación: por tempwin