User Tools

Site Tools


informatica:linux:script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
informatica:linux:script [2019/09/24 10:38] joseinformatica:linux:script [2020/11/06 19:52] jose
Line 388: Line 388:
  
 ====== SED ====== ====== SED ======
 +No es sed, pero para reemplazar dentro de una variable
 +  var="hola que tal"
 +  echo $var
 +    hola que tal
 +Solo cambia el primero:
 +  echo ${var/ /%20}
 +    hola%20que tal
 +Los cambia todos:
 +  echo ${var// /%20}
 +  hola%20que%20tal
 +
 ===== Mostrar un parámetro ===== ===== Mostrar un parámetro =====
   echo "param1=hola param2=que param3=tal" | sed -e 's/^.*param1=\([^ ]*\).*$/\1/'   echo "param1=hola param2=que param3=tal" | sed -e 's/^.*param1=\([^ ]*\).*$/\1/'
Line 790: Line 801:
   20190420_225307   20190420_225307
  
-====== Poner fecha en historial history ======+====== History ====== 
 + 
 +===== Poner fecha en historial history =====
 export HISTTIMEFORMAT='%d/%m/%Y %H:%M:%S: ' export HISTTIMEFORMAT='%d/%m/%Y %H:%M:%S: '
  
-====== Salir terminal sin grabar history ======+===== Salir terminal sin grabar history =====
   kill -9 $$   kill -9 $$
 +
 +===== Historial infinito =====
 +export HISTSIZE=""
 +
 +
  
 ====== Unixtime ====== ====== Unixtime ======
Line 932: Line 950:
  
 ====== Buscar paquete debian ====== ====== Buscar paquete debian ======
 +Instalamos apt-file y hacemos apt-file update. Buscamos:
 +  apt-file search --regexp '/identify$'
 +Que lo que hace es esta búsqueda:
   # apt-file search /usr/bin/identify   # apt-file search /usr/bin/identify
   graphicsmagick-imagemagick-compat: /usr/bin/identify   graphicsmagick-imagemagick-compat: /usr/bin/identify
informatica/linux/script.txt · Last modified: 2024/04/19 07:00 by jose