Skip to content

Commit

Permalink
More awk removal
Browse files Browse the repository at this point in the history
  • Loading branch information
richo committed Aug 27, 2012
1 parent 2562019 commit a9fb69a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions scripts/disk-usage
Expand Up @@ -14,14 +14,15 @@ usage()

disk_usage()
{
typeset path name
typeset path name _pre
name="$1"
path="$2"
shift 2
printf "%${length}s" "${name} Usage: "
if [[ -n "$path" && -d "$path" && "$path" != "/" ]]
then
du -hs "$@" "${path}/" | awk '{print $1}'
_pre="$(du -hs "$@" "${path}/")"
echo ${_pre%% *}
else
echo "0B"
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs
Expand Up @@ -3,7 +3,7 @@ rvm_base_except="selector"

source "$rvm_scripts_path/base"

rvm_docs_ruby_string="$(__rvm_env_string | awk -F"${rvm_gemset_separator:-"@"}" '{print $1}')"
rvm_docs_ruby_string="${__rvm_env_string%%${rvm_gemset_seperator:-"@"}*}"

if [[ "$rvm_docs_ruby_string" == "system" || -z "$rvm_docs_ruby_string" ]]
then
Expand Down

0 comments on commit a9fb69a

Please sign in to comment.