miscutils/mkgmap

16 lines
277 B
Bash
Executable File

#!/bin/sh
[ -f $HOME/.mkgmap.head ] && cat $HOME/.mkgmap.head
for i in $(ls -r *.txt)
do
date=$(echo $i | sed 's/\(....\)\(..\)\(..\).*/[\1.\2.\3]/')
name=$(
sed -n -e '
/[^ ]/ {
s/^[ ]*//
p
q
}
b' $i)
printf "0%s %s\t%s\n" "$date" "$name" "$i"
done