catallfiles
von heisenberg- SNIPPET_DESC:
- zeigt alle dateien - egal wie komprimiert - an
- SNIPPET_CREATION_TIME:
- 14.10.2020 21:06:35
- SNIPPET_PRUNE_TIME:
- Unendlich
- SNIPPET_TEXT:
-
- catfile() {
- local file="$1"
- command="cat"
- [[ "$file" =~ \.xz$ ]] && command=xzcat
- [[ "$file" =~ \.gz$ ]] && command=zcat
- [[ "$file" =~ \.bz(ip)?2$ ]] && command=bzcat
- $command "$file"
- }
- catallfiles() {
- for logfile in $(ls -1 "$@" | xargs ls -1tra);do
- catfile $logfile
- done
- }
Quellcode
Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN