All pastes #159752 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-09-03 13:45 UTC
rendered paste body
khalia kiorky # cat file.sh
u="0";
whatremerge="world"
whenremerge="perl-5.8.8-r2"

emerge -pe $whatremerge|\
sed -re "s/\[(ebuild|binary)\s*N\s*\]\s*/=/"|\
awk -F  ' ' '{print $1 }'|\
grep "/">toto;


u="0"
echo "">titi
for i in $(cat toto);do
        u=$(($u+1))
        echo "$u $i">>titi
        done

cat titi |sed -re "s/([0-9]*)(\s*.*\/)(.*)/\1 \3/">tutu;

LINE=$(cat tutu|sed -re "s/\s*.*\///"|grep $whenremerge|head -n 1|awk -F  ' ' '{print $1 }')
echo $LINE
LONGUEUR=$(cat toto| wc -l )
NBLI=$(($LONGUEUR-$LINE+1))


emerge --oneshot -a  $(cat toto |tail -n $NBLI)