"Fossies" - the Fresh Open Source Software Archive

Member "systeminfo/report/ram.sh" (4 Feb 2005, 312 Bytes) of package /linux/privat/old/systeminfov12.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 # RAM Size generator
    3 while read line; do 
    4 echo $line | grep -q 'Available RAM size'
    5 if [[ $? -eq 0 ]]
    6 then 
    7     echo $line | awk -v var="`/bin/awk '/^MemTotal/ { print $2/1024 }' /proc/meminfo`" '{ print $1" "$2" "$3" "$4" "$5" "$6" "var" MB"$7 }'
    8 else 
    9     echo $line
   10 fi
   11 done < ram.html > $1/ram.html