alias t='cd /tmp'
function trash () {
- TRASH=$(find /tmp/ -maxdepth 1 -mmin -15 -type d -name "trash-*" | sort | tail -1)
+ TRASH=$(date +/tmp/trash-%Y-%b-%d-%Hh)
- if [[ ${TRASH} ]]; then
+ if [[ -d ${TRASH} ]]; then
echo "Re-use ${TRASH}"
else
- TRASH=$(date +/tmp/trash-%Y-%b-%d-%H_%M_%S)
mkdir ${TRASH}
- echo "Created ${TRASH}:"
+ echo "Created ${TRASH}"
fi
mv "$@" ${TRASH}
+ echo "Trashed $@"
}
-alias trash=trash.sh
+# alias trash=trash.sh
function mmsget () {
mplayer $1 -dumpstream -dumpfile $(basename $1)
# Contact <francois@fleuret.org> for comments & bug reports #
#########################################################################
-INTERFACE=wlan0
+INTERFACE=${WIFI_INTERFACE}
+
+[[ ${INTERFACE} ]] || INTERFACE=wlan0
+
MTU=512
SCAN_OUTPUT=$(mktemp /tmp/scanresult.XXXXXX)
# Move things to a newly created trash directory in /tmp/. Re-use an
# existing one if it is less than 5min old.
-TRASH=$(find /tmp/ -maxdepth 1 -mmin -5 -type d -name "trash*" | sort | tail -1)
+TRASH=$(find /tmp/ -maxdepth 1 -mmin -15 -type d -name "trash*" | sort | tail -1)
if [[ ${TRASH} ]]; then
echo "Re-use ${TRASH}"