informatica:linux:script
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:linux:script [2022/09/22 09:08] – [Servidor externo] jose | informatica:linux:script [2024/04/19 07:00] (current) – [Servidor externo] jose | ||
---|---|---|---|
Line 211: | Line 211: | ||
</ | </ | ||
==== Servidor externo ==== | ==== Servidor externo ==== | ||
- | Con estos comandos | + | Como alternativa a telnet se pueden usar estos comandos. A veces hay que poner el nombre del servicio, por ejemplo una VIP de oracle |
cat < /dev/null > / | cat < /dev/null > / | ||
+ | | ||
Conexión correcta, no da error: | Conexión correcta, no da error: | ||
# cat < /dev/null > / | # cat < /dev/null > / | ||
Line 239: | Line 240: | ||
Con curl: | Con curl: | ||
curl -v telnet://< | curl -v telnet://< | ||
+ | |||
+ | en un script con lista y colores: | ||
+ | < | ||
+ | #!/bin/bash | ||
+ | |||
+ | ecco() { | ||
+ | local text=" | ||
+ | local color=" | ||
+ | case " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | *) echo " | ||
+ | esac | ||
+ | } | ||
+ | |||
+ | azul=" | ||
+ | verde=" | ||
+ | rojo=" | ||
+ | |||
+ | # Definir la lista de microservicios y puertos | ||
+ | microservicios=( | ||
+ | wzc-authentication 16443 | ||
+ | features-matrix 14443 | ||
+ | wzc-access-rules 35443 | ||
+ | wzc-authorization 26443 | ||
+ | wzc-card 24443 | ||
+ | wzc-card-payment 28443 | ||
+ | wzc-card-reward 31443 | ||
+ | wzc-card-transaction 29443 | ||
+ | wzc-client-profile 17443 | ||
+ | wzc-client-rights 20443 | ||
+ | wzc-device 21443 | ||
+ | wzc-document 19443 | ||
+ | wzc-message 18443 | ||
+ | wzc-notification 23443 | ||
+ | wzc-registration 25443 | ||
+ | ) | ||
+ | echo | ||
+ | for ((i=0; i< | ||
+ | echo " | ||
+ | line=(" | ||
+ | microservicio=" | ||
+ | puerto=" | ||
+ | echo -n " | ||
+ | (>/ | ||
+ | done | ||
+ | |||
+ | echo " | ||
+ | </ | ||
====== Demonio ====== | ====== Demonio ====== | ||
Se crea un fichero kkfichero que mientras este creado se ejecuta el script. \\ | Se crea un fichero kkfichero que mientras este creado se ejecuta el script. \\ | ||
Line 871: | Line 922: | ||
| | ||
====== Date ====== | ====== Date ====== | ||
- | |||
http:// | http:// | ||
+ | Formato fecha custom: | ||
+ | date +%Y%m%d_%H%M%S | ||
+ | 20190420_225307 | ||
+ | | ||
+ | date +' | ||
+ | 10/10/2023 20:11:31 | ||
+ | |||
+ | | ||
date --date=' | date --date=' | ||
date --date=' | date --date=' | ||
Line 887: | Line 945: | ||
date --date=' | date --date=' | ||
date --date=' | date --date=' | ||
- | |||
- | Formato fecha custom: | ||
- | date +%Y%m%d_%H%M%S | ||
- | 20190420_225307 | ||
Pasar una fecha a unixtime: | Pasar una fecha a unixtime: |
informatica/linux/script.1663837682.txt.gz · Last modified: 2022/09/22 09:08 by jose