Skip to content

Instantly share code, notes, and snippets.

@brandonprry
Last active June 20, 2024 12:54

Revisions

  1. brandonprry revised this gist Feb 27, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion afl-ptmin.sh
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,6 @@ do
    for i in `seq 0 $(expr $cores - 1)`
    do
    file=`ls -Sr $inputdir | sed $(expr $i + $k)"q;d"`
    echo $file
    afl-tmin -i $inputdir/$file -o $outputdir/$file -- & #put the command to run after the --
    done

  2. brandonprry revised this gist Feb 27, 2016. 1 changed file with 1 addition and 9 deletions.
    10 changes: 1 addition & 9 deletions afl-ptmin.sh
    Original file line number Diff line number Diff line change
    @@ -13,15 +13,7 @@ do
    file=`ls -Sr $inputdir | sed $(expr $i + $k)"q;d"`
    echo $file
    afl-tmin -i $inputdir/$file -o $outputdir/$file -- & #put the command to run after the --
    pids="$pids$!\n"
    done

    for i in `echo -e $pids`
    do
    while ps -p $i > /dev/null
    do
    echo "sleeping for pid $i"
    sleep 3
    done
    done
    wait
    done
  3. brandonprry revised this gist Feb 14, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion afl-ptmin.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ for k in `seq 1 $cores $total`
    do
    for i in `seq 0 $(expr $cores - 1)`
    do
    file=`ls $inputdir | sed $(expr $i + $k)"q;d"`
    file=`ls -Sr $inputdir | sed $(expr $i + $k)"q;d"`
    echo $file
    afl-tmin -i $inputdir/$file -o $outputdir/$file -- & #put the command to run after the --
    pids="$pids$!\n"
  4. brandonprry revised this gist Nov 21, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions afl-ptmin.sh
    Original file line number Diff line number Diff line change
    @@ -18,10 +18,10 @@ do

    for i in `echo -e $pids`
    do
    if ps -p $i > /dev/null
    then
    while ps -p $i > /dev/null
    do
    echo "sleeping for pid $i"
    sleep 3
    fi
    done
    done
    done
  5. brandonprry revised this gist Nov 21, 2015. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion afl-ptmin.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,6 @@ for k in `seq 1 $cores $total`
    do
    for i in `seq 0 $(expr $cores - 1)`
    do

    file=`ls $inputdir | sed $(expr $i + $k)"q;d"`
    echo $file
    afl-tmin -i $inputdir/$file -o $outputdir/$file -- & #put the command to run after the --
  6. brandonprry created this gist Nov 21, 2015.
    28 changes: 28 additions & 0 deletions afl-ptmin.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    #!/bin/bash

    cores=$1
    inputdir=$2
    outputdir=$3
    pids=""
    total=`ls $inputdir | wc -l`

    for k in `seq 1 $cores $total`
    do
    for i in `seq 0 $(expr $cores - 1)`
    do

    file=`ls $inputdir | sed $(expr $i + $k)"q;d"`
    echo $file
    afl-tmin -i $inputdir/$file -o $outputdir/$file -- & #put the command to run after the --
    pids="$pids$!\n"
    done

    for i in `echo -e $pids`
    do
    if ps -p $i > /dev/null
    then
    echo "sleeping for pid $i"
    sleep 3
    fi
    done
    done