Register

Welcome to the RDI-Board Community.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Donate Now Goal amount for this month: 100 EUR, Received: 100 EUR (100%)
Donate to support this site...

Results 1 to 2 of 2
  1. #1
    Member Mentor
    RDI - Board Default Avatar

    Join Date
    Sep 2007
    Posts
    503
    Posts Thanks / Likes

    Default Am gasit asta ...

    Am gasit asta pe http://www.gboxforum.com/gb/showthread.php?t=14280

    nu prea stiu ce denumire sa i dau si unde sa il bag.

    #!/bin/sh

    IFILE="/tmp/share.info"
    OFILE="/tmp/share.onl"

    PEERS=$(cat ${OFILE} | sed 's/^. \([^ ]*\) [^ ]* \([^ ]*\) .*/\1 \2/' | sort)

    echo; echo "GBOX digest"; echo "==========="; echo

    SV=$(cat ${IFILE} | awk '{ print $4 }' | sort | uniq)
    for S in ${SV}; do
    C=$(grep " ${S} " ${IFILE} | awk '{ print $6 }' | wc -l)
    P=$(grep " ${S} " ${IFILE} | awk '{ print $6 }' | uniq | wc -l)
    echo "${S}: ${C} cards, ${P} providers"
    done

    echo ""

    LV=$(cat ${IFILE} | awk '{ print $8 }' | sort | uniq)
    for L in ${LV}; do
    CNT=$(grep " ${L} " ${IFILE} | wc -l)
    TMP=$(echo "${L}" | sed 's/Lev:\(.*\)/Level \1/')
    echo "${TMP}: ${CNT} cards"
    done

    echo ""

    DI=$(cat ${IFILE} | awk '{ print $9 }' | sort | uniq)
    for D in ${DI}; do
    CNT=$(grep " ${D} " ${IFILE} | wc -l)
    TMP=$(echo "${D}" | sed 's/dist:\(.*\)/Distance \1/')
    echo "${TMP}: ${CNT} cards"
    done

    echo ""

    echo "Level 1 / Distance 1:"
    cat ${IFILE} | grep " Lev:1 dist:1 " | sed 's/^.* at \([^ ]*\) Card \([^ ]*\) .* id:\(.*\)$/\1 \2 \3/' | sort | \
    while read LINE; do
    P=$(echo "${LINE}" | awk '{ print $1 }')
    CID=$(echo "${LINE}" | awk '{ print $2 }')
    BID=$(echo "${LINE}" | awk '{ print $3 }')
    PID=$(echo "${PEERS}" | grep "^${P} " | head -1 | awk '{ print $2 }')
    echo "Card ${CID} via ${P}(${PID}) from box ${BID}"
    done

    echo ""

    BX=$(cat ${IFILE} | awk '{ print $10 }' | sed 's/id://' | sort | uniq)
    CNT=0
    # Max boxes per line
    ML=10
    echo "All box IDs:"
    for B in ${BX}; do
    if [ ${CNT} -gt ${ML} ]; then echo ""; CNT=0; fi
    echo -n "${B} "
    CNT=$(( ${CNT} + 1 ))
    done

    echo;echo

  2. #2
    Digitally Remastered Expert
    Join Date
    Feb 2005
    Location
    root
    Posts
    1,527
    Posts Thanks / Likes

    Default

    Ce ai găsit tu acolo e un script ce poate fi folosit la DM.
    Ca să-l poţi utiliza trebuie să-l salvezi cu un editor de unix (ex. PSPad, ai acolo opţiunea UNIX Shell Script), cu ce nume vrei tu (ex. gbox_digest.sh). Terminaţia .sh e obligatorie. Apoi pui scriptul n /var/script şi i dai atribute 755. Pentru a-l executa, porneşti DCC şi mergi la Telnet (sau orice alt Telnet). Dai comanda cd /var/script (ENTER) şi apoi ./gbox_digest.sh (ENTER).
    Nu te aştepta să facă minuni. Din cte văd eu, scriptul citeşte share.info şi share.onl şi ţi afişează un sumar al cardurilor, peers, etc.
    [LEFT]Signature not found... Try again!

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Back to Top