Skip to content

Instantly share code, notes, and snippets.

View matthieu637's full-sized avatar

Matthieu Zimmer matthieu637

  • London
View GitHub Profile
@matthieu637
matthieu637 / ps aux with ppid
Created May 30, 2020 11:01 — forked from nestoru/ps aux with ppid
ps aux with ppid
ps aux|head -1
# Returns: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
ps axo user,pid,ppid,pcpu,pmem,vsz,rss,tname,stat,start,time,args|head -1
# Returns: USER PID PPID %CPU %MEM VSZ RSS TTY STAT STARTED TIME COMMAND
@matthieu637
matthieu637 / 2csv_duplicate_minus.bash
Last active March 26, 2018 12:20
you have 2 csv for 2 differents years, you want to know who's new, stayed, leaved
##1) exporter les fichiers au format CSV
##2) extraire les numéros d'identification avec :
tail -n +2 2017.csv | cut -d',' -f 1 > id_2017
#tail -n +2 permet d'enlever la première ligne du fichier (souvent des titres de colonnes)
#cut -f1 permet de choisir la colonne où se trouve les identifiants
##3) vérifier (visualiser) que id_2017 contient bien les identifiants voulus
#cat id_2017