aboutsummaryrefslogblamecommitdiffstats
path: root/cat-nonbackups
blob: 387cf7a17d9df9bc1e748f676fd261ef108c293b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                           
#!/bin/sh
set -e
good_filename () {
	test -n "$(printf '%s\n' "$1" | grep -v '~$' || :)" || return 1
	test -n "$(printf '%s\n' "$1" | grep -v '\.swo$' || :)" || return 1
	test -n "$(printf '%s\n' "$1" | grep -v '\.swp$' || :)" || return 1
	test -n "$(printf '%s\n' "$1" | grep -v '\.bak$' || :)" || return 1
	test -n "$(printf '%s\n' "$1" | grep -v '^\.#' || :)" || return 1
	test -n "$(printf '%s\n' "$1" | grep -v '^#' || :)" || return 1
}
for file; do
	if good_filename "$file" >/dev/null 2>/dev/null; then
		cat -- "$file"
	fi
done