* allow spaces in log files

This commit is contained in:
Reinhard Pointner 2015-03-29 17:28:34 +00:00
parent 229d701564
commit 05b980f77d
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,8 @@ case "$1" in
;; ;;
log) log)
# Select most recently modified log file (Caveats: the path of the log file must not contain spaces) # select most recently modified log file
find "$APP_ROOT/data" -name "*.log" -type f -print0 | xargs -0 ls -Alt1 | head -n 1 | awk '{print $7}' find "$APP_ROOT/data" -name "*.log" -type f -print0 | xargs -0 ls -Alt1 | head -n 1 | sed -e 's/\s\+/\s /g' | cut -d' ' -f7-
exit 0 exit 0
;; ;;