Jump to content

keb0x80

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by keb0x80

  1. I created a script to generate pretty much the same output using only bash loops/conditions


    #!/bin/bash
    count=0
    echo "DELAY 5000"
    for pin in {0000..9999}
    do
    count=$((count+1))
    echo "STRING $pin"
    # After every other pin, do this
    if [ $((count % 2)) -eq 0 ]; then
    echo "DELAY 1000"
    echo "ENTER"
    echo "ENTER"
    fi
    # After 5 pins, do this
    if [ $((count % 5)) -eq 0 ]; then
    for (( delay=0 ; $((delay < 4)) ; delay=$((delay+1)) ))
    do
    echo "DELAY 5000"
    echo "ENTER"
    done
    fi
    done
    [/CODE]

×
×
  • Create New...