Primera letra en mayúsculas con bash
[bash] MODULO="modulo" mayuscula=$(echo $MODULO | awk ‘ { out = out" "toupper(substr($0,1,1))substr($0,2) } END{ print substr(out,2) } ‘) echo $mayuscula…
[bash] MODULO="modulo" mayuscula=$(echo $MODULO | awk ‘ { out = out" "toupper(substr($0,1,1))substr($0,2) } END{ print substr(out,2) } ‘) echo $mayuscula…
Ejemplo: Devuelve 3 valores a partir del 10. [bash] $ set — /bin/* ; inicio=10 ; final=3 ; echo ${@:inicio:final}…
En caso de ejecutarse el script directamente lanzamos función interna. [bash][[ "`basename $BASH_SOURCE`" = "`basename $0`" ]] && funcion_interna[/bash]
[bash] for x in $(cat ) ; do echo $(echo $x | awk -v FS="/" ‘{print $(NF)}’) done [/bash]
Doxygen tiene la capacidad de hacer un filtrado antes de procesar los archivos, para activarlo creamos un script en bash…
Solve real-world shell scripting problems with over 110 simple but incredibly effective recipes Sarath Lakshman Lectura muy recomendada, sobre las…