fork download
  1. {
  2. match($0, /gres\/gpu=([[:digit:]]+)/); out = substr($0, RSTART+1, RLENGTH-1); split(out,a,"=")
  3. print a[2]
  4. }
Success #stdin #stdout 0.01s 5284KB
stdin
billing=1,cpu=1,gres/gpu=2,mem=245000M,node=1
stdout
2