From 889489c8ce3339ca3b6cab45ec58e73cca40a51a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 10 Nov 2007 15:40:53 +0100 Subject: Using shell redirection to truncate rather than additional commands/forks/files, thanks to Justin Pryzby . --- functions/aliases.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 functions/aliases.sh (limited to 'functions') diff --git a/functions/aliases.sh b/functions/aliases.sh new file mode 100755 index 000000000..04efc24a7 --- /dev/null +++ b/functions/aliases.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# aliases.sh - internal shell aliases +# Copyright (C) 2006-2007 Daniel Baumann +# +# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +# This is free software, and you are welcome to redistribute it +# under certain conditions; see COPYING for details. + +set -e + +Truncate () +{ + for FILE in ${@} + do + : > ${FILE} + done +} -- cgit v1.2.3