From 268c0dd538ba427f7a54cb96f1e1b3fcc83fd6bf Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Fri, 8 Aug 2008 22:20:56 -0300 Subject: Replacing file checking with ls by function calls Instead of repeatedly doing "ls ... > /dev/null 2>&1", just use a function that does exactly that. --- functions/aliases.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'functions') diff --git a/functions/aliases.sh b/functions/aliases.sh index c4e029038..15ae2ae58 100755 --- a/functions/aliases.sh +++ b/functions/aliases.sh @@ -17,6 +17,11 @@ Truncate () done } +Find_files () +{ + (ls "${@}" | grep -qs .) > /dev/null 2>&1 +} + In_list () { NEEDLES="${1}" -- cgit v1.2.3