/
envoy.istio
/
oblogproxy
Обзор
Документация
Войти
/
envoy.istio
/
oblogproxy
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
script/list_logreader_path.sh
21 строка
506 B
wangxiantong.wxt
support binlog format
15 ноя 2023, 16:06
15 ноя 2023, 16:06
e5dd20d
Код
Авторство
О чём код?
#!/usr/bin/env bash dirname=$(readlink -f $1) for path in $(ls ${dirname} | tr '\t' '\n'); do d=${path} path=$(readlink -f ${dirname}/${path}) if [[ $? -ne 0 ]]; then continue fi tm='' if [ -f "${path}/log" ]; then tm=$(ls -l --time-style=+%s ${path}/log | head -2 | tail -1 | awk '{print $6}') fi if [ -z "${tm}" ]; then tm=$(ls -l --time-style=+%s ${path}/.. | grep "${d}" | tail -1 | awk '{print $6}') fi echo -e "${tm}\t${path}" done