×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    Pastebin: Difference between revisions

    Content added Content deleted
    (Need to display all IPs on machine 1. 123.123123 <newline> 2. 222.22.22.22 <newline> 3. 21.21.21.21 etc etc.. then have it say Choose which IP to use Prompt user for a number 1-NUMIPS)
     
    imported>mutante
    mNo edit summary
    Line 1: Line 1:
    <pre>
    #!/bin/bash
    #!/bin/bash


    Line 11: Line 12:
    COUNT=`expr $COUNT + 1`
    COUNT=`expr $COUNT + 1`
    done
    done
    </pre>

    Revision as of 00:37, 25 February 2005

    #!/bin/bash
    
    IPS=$(ifconfig | awk '/inet/ { print $2 }' | awk -F ":" '{ print $2 }')
    
    NUMIPS=$(echo $IPS | wc -w)
    
    COUNT=1
    for i in $IPS
    do
      export IP$COUNT=$i
      COUNT=`expr $COUNT + 1`
    done
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.