Test Switches

One of the fundamental elements of programming is the ability to make comparisons: you test for certain conditions to be able to make decisions. You can use the test command to evaluate many items, such as variables, strings, and numbers. I keep the information in this appendix close at hand since I haven’t memorized all of the parameters. I often use these switches for checking files and strings, and this is a simple quick reference for easy lookup.

Note that in Table A-1 the “test” column refers to the system command test such as /usr/ bin/test. The “bash” and “ksh” columns refer to the built-in test command for those shell




Por favor, inicia sesión con uno de estos métodos para publicar tu comentario:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s