список групп по последней строке каждой строки

set -g visual-bell on

Esto hará que tmuxmuestre un mensaje ("Campana en la ventana actual" )en lugar de decirle a la terminal que emita un pitido. El mensaje puede ocultar los cambios en la barra de estado que ha realizado con su propio enlace.

Del manual:

visual-bell [on | off | both]

If on, a message is shown on a bell in a window for which the monitor-bell window option is enabled instead of it being passed through to the terminal (which normally makes a sound). [...]

1
05.07.2019, 01:09
2 ответа

Запомнить последний внешний ip в переменной. Если новый IP отличается, распечатайте новый. Затем распечатайте диапазон IP-адресов.

#! /bin/bash
last_ip=""
while read range _e ip ; do
    if [[ $ip != "$last_ip" ]] ; then
        printf '\nExternal: %s\n' "$ip"
    fi
    printf '  %s\n' "$range"
    last_ip=$ip
done < "$1"
2
27.01.2020, 23:30
awk '{

if($2$3 in STORE){

##make column 2 and column 3 as key to store address.
STORE[$2$3]=STORE[$2$3]"\n""\t"$1  ##add new line here 

}
else{
##if key not in STORE, add first column with a tab 
STORE[$2$3]="\t"$1 

}
}
##print everything using END 

END{
for(add in STORE){
print add"\n"STORE[add]
}
}' file.txt
0
27.01.2020, 23:30

Теги

Похожие вопросы