Holdtorun.awk: Difference between revisions

From Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 3: Line 3:
----
----
#!/bin/awk -f
#!/bin/awk -f
BEGIN{
BEGIN{
a = 0
a = 0
b = 0
b = 0
p24=0
p24=0
p20=0
p20=0
p12 = 0
p12 = 0
p8 = 0
p8 = 0
unhold = 0
unhold = 0
}
}


{
{
if ($9 == "24"){
if ($9 == "24"){
p24 = p24 + 1
p24 = p24 + 1
}
}
}
}


{
{
if ($9 == "20"){
if ($9 == "20"){
p20 = p20 + 1
p20 = p20 + 1
}
}
}
}


{
{
if ($9 == "12"){
if ($9 == "12"){
p12 = p12 + 1
p12 = p12 + 1
}
}
}
}


{
{
if ($9 == "8"){
if ($9 == "8"){
p8 = p8 + 1
p8 = p8 + 1
}
}
}
}


{
{
if (($5 == "qw")&&($8 == "24")){
if (($5 == "qw")&&($8 == "24")){
a = a + 1
a = a + 1
}
}
}
}


{
{
if (($5 == "qw")&&($8 == "20")){
if (($5 == "qw")&&($8 == "20")){
a = a + 1
a = a + 1
}
}
}
}


{
{
if (($5 == "qw")&&($8 == "12")){
if (($5 == "qw")&&($8 == "12")){
a = a + 1
a = a + 1
}
}
}
}


{
{
if (($5 == "qw")&&($8 == "8")){
if (($5 == "qw")&&($8 == "8")){
a = a + 1
a = a + 1
}
}
}
}




{
{
if ($5 == "hqw"){  
if ($5 == "hqw"){  
pgrans= p24 + p20 + p12 + p8 + a
pgrans= p24 + p20 + p12 + p8 + a
unhold = 12 - pgrans
unhold = 12 - pgrans
b = b + 1
b = b + 1
     {
     {
     if (unhold >= b){
     if (unhold >= b){
         print $1 > "holdid"
         print $1 > "holdid"
     }
     }
     }
     }
}
}
}
}


END{
END{
}
}

Latest revision as of 09:37, 12 May 2016

go back to Main_Page, Computational Resources, Clusters, Local Clusters, Kimik2, QUEUES for FELIU MASERAS group


  1. !/bin/awk -f

BEGIN{

a = 0

b = 0

p24=0

p20=0

p12 = 0

p8 = 0

unhold = 0

}

{

if ($9 == "24"){

p24 = p24 + 1

}

}

{

if ($9 == "20"){

p20 = p20 + 1

}

}

{

if ($9 == "12"){

p12 = p12 + 1

}

}

{

if ($9 == "8"){

p8 = p8 + 1

}

}

{

if (($5 == "qw")&&($8 == "24")){

a = a + 1

}

}

{

if (($5 == "qw")&&($8 == "20")){

a = a + 1

}

}

{

if (($5 == "qw")&&($8 == "12")){

a = a + 1

}

}

{

if (($5 == "qw")&&($8 == "8")){

a = a + 1

}

}


{

if ($5 == "hqw"){

pgrans= p24 + p20 + p12 + p8 + a

unhold = 12 - pgrans

b = b + 1

   {
   if (unhold >= b){
        print $1 > "holdid"
   }
   }

}

}

END{

}