find . -maxdepth 1 -type f | \grep \. | sed -e 's/^.*\.\([^/.]*\)$/\1/'
}
-function obs () {
- dir=${HOME}/misc/use-by-$(date --date='+3 months' +%Y-%b-%d)
+# function catscan () {
+ # convert signal-attachment-2020-06-01-192843.jpeg signal-attachment-2020-06-01-192829.jpeg -quality 25 -sigmoidal-contrast 10,45% -page a4 scan.pdf
+# }
+
+function trash-later () {
+ dir=${HOME}/misc/trash-later/remove-after-$(date --date='+3 months' +%Y-%b-%d)
mkdir -p "${dir}"
pushd "${dir}"
}
function trash () {
- [[ "${TRASH_ROOT}" ]] || TRASH_ROOT="${HOME}/.trash"
+ [[ "${TRASH_LATER_ROOT}" ]] || TRASH_LATER_ROOT="${HOME}/.trash"
if [[ "$1" == "--" ]]
then
shift
- elif [[ "$1" == "-t" ]]
+ elif [[ "$1" == "-l" ]]
then
shift
- TRASH_DIR="${TRASH_ROOT}"
+ echo "Trashin in 3 months"
+ TRASH_DIR="${TRASH_LATER_ROOT}/remove-after-$(date --date='+3 months' +%Y-%b-%d)"
mkdir -p "${TRASH_DIR}"
else
TRASH_DIR=$(date +/tmp/trash-${USER}-%Y-%b-%d-%Hh)
return 0
fi
- if \ifconfig -s | grep -q -v ^'(Iface|lo) '
+ if \ifconfig -s | grep -q -v ^'(Iface|lo|docker[0-9]) '
then
echo "There is/are already interface(s) up." >&2
return 1