From 47d7004f6a85391e06a566640d041bcc08f45e6e Mon Sep 17 00:00:00 2001 From: akl Date: Fri, 27 Jul 2007 13:43:20 +0000 Subject: [PATCH] Script to get available disk space by the given directory that selected by user. --- config_files/diskSpace.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 config_files/diskSpace.sh diff --git a/config_files/diskSpace.sh b/config_files/diskSpace.sh new file mode 100755 index 0000000..12812cf --- /dev/null +++ b/config_files/diskSpace.sh @@ -0,0 +1,26 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : diskSpace.sh +# Created : Mon Jun 25 17:09:00 2007 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2007 CEA +# +# This script is the part of the SALOME installation procedure. +# +# The script returns available disk space. +# +# Usage: diskSpace +# +#################################################################################### + +if [ $# -lt 1 ] ; then + echo "`basename $0` : wrong parameters" + exit 1 +fi +var=`df -k "$1" | awk '{print $4}'` +for i in $var; do var=$i; done +echo $var +exit 0 -- 2.39.2