stockholm/bin/ls-bre
2015-05-21 01:56:08 +02:00

13 lines
194 B
Bash
Executable File

#! /bin/sh
# ls-bre : directory -> BRE
# Create a BRE from the files in a directory.
set -euf
ls "$1" \
| tr \\n / \
| sed '
s:[\.\[\\\*\^\$]:\\&:g
s:/$::
s:/:\\|:g
'