Changeset 275 in MondoRescue for branches/2.06/tools/rpm-env


Ignore:
Timestamp:
Jan 3, 2006, 4:59:29 PM (15 years ago)
Author:
bcornec
Message:

more cat commands removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/tools/rpm-env

    r265 r275  
    3636if [ -e /etc/mandriva-release ]; then
    3737    export ddir="mandriva"
    38     export dver=`cat /etc/mandriva-release | awk '{print $4}'`
     38    export dver=`awk '{print $4}' /etc/mandriva-release`
    3939    export suf="${dver}mdk"
    4040elif [ -e /etc/mandrake-release ]; then
    4141    export ddir="mandrake"
    42     export dver=`cat /etc/mandrake-release | awk '{print $3}'`
     42    export dver=`awk '{print $3}' /etc/mandrake-release`
    4343    export suf="${dver}mdk"
    4444elif [ -e /etc/redhat-release ]; then
     
    4646    if [ $? -eq 0 ]; then
    4747        export ddir="rhel"
    48         export dver=`cat /etc/redhat-release | awk '{print $7}'`
     48        export dver=`awk '{print $7}' /etc/redhat-release`
    4949    elif grep -q Fedora /etc/redhat-release ; then
    5050        export ddir="fedora"
    51         export dver=`cat /etc/redhat-release | awk '{print $4}'`
     51        export dver=`awk '{print $4}' /etc/redhat-release`
    5252        export suf="fc${dver}"
    5353    else
    5454        export ddir="redhat"
    55         export dver=`cat /etc/redhat-release | awk '{print $5}' | sed "s/\.//"`
     55        export dver=`awk '{print $5}' /etc/redhat-release | sed "s/\.//"`
    5656        export suf="rh${dver}"
    5757    fi
     
    6060    if [ $? -eq 0 ]; then
    6161        export ddir="sles"
    62         export dver=`cat /etc/SuSE-release | head -1 | awk '{print $5}'`
     62        export dver=`head -1 /etc/SuSE-release | awk '{print $5}'`
    6363    else
    6464        export ddir="suse"
    65         export dver=`cat /etc/SuSE-release | head -1 | awk '{print $3}'`
     65        export dver=`head -1 /etc/SuSE-release | awk '{print $3}'`
    6666    fi
    6767else
Note: See TracChangeset for help on using the changeset viewer.