From b3416142f2a676acbfca0738ea386d40bef74313 Mon Sep 17 00:00:00 2001 From: Marco Amadori Date: Sat, 11 Oct 2008 23:31:22 +0200 Subject: Removed all "cat | grep", with grep, awk and sed. --- scripts/live | 10 +++++----- scripts/live-bottom/08persistence_excludes | 2 +- scripts/live-functions | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/live b/scripts/live index fd0da8b..9c747d5 100755 --- a/scripts/live +++ b/scripts/live @@ -613,7 +613,7 @@ copy_live_to () if [ "${copytodev}" = "ram" ] then # copying to ram: - freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( cat /proc/meminfo | grep Cached | head -n 1 | awk '/Cached/{print $2}' - ) ) + freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( awk '/\