User Tools

Site Tools

mbstring extension must be loaded in order to run mPDF

Some Commands Help

  • dos to unix format: tr -d '\r' < input.file > output.file
  • sed
  1. sustituir fin de linea por espacio: sed ':a;N;$!ba;s/\n/ /g' a.txt > b.txt
  2. insertar headers a un csv: sed -i '1iSubject,PSubject' guia_mri_proper.csv
  • flac to mp3: for x in *.flac; do ffmpeg -i “$x” -qscale:a 0 “${x%.flac}.mp3”; done
  • para leer array en bash:
[osotolongo@detritus mopead]$ x=$(head -n 1 tmp/infoups.csv)
[osotolongo@detritus mopead]$ IFS=','  read -r -a array <<< "$x"
[osotolongo@detritus mopead]$ echo ${array[0]}
[osotolongo@detritus mopead]$ echo ${array[1]}
  • Actualizar dcm2niix:
$ git clone -b development
$ cd dcm2niix
$ mkdir build
$ cd build/
$ cmake
$ cp dcm2niix /nas/software/bin/
$ cp /nas/software/bin/dcm2niix /usr/local/mricron/
$ dcm2niix 
Chris Rorden's dcm2niiX version v1.0.20191031  GCC4.4.7 (64-bit Linux)
usage: dcm2niix [options] <in_folder>
commands.txt · Last modified: 2020/08/04 10:58 (external edit)