list-sn-all.py 327 B

123456789101112131415161718
  1. #!/usr/bin/env python3
  2. import sys
  3. def main():
  4. infile = open(sys.argv[1], 'r')
  5. hosts = infile.readlines()
  6. for line in hosts:
  7. if line[0] == '#':
  8. continue
  9. arr = line.split()
  10. for k in range(1, 21):
  11. print('r%d' % k + arr[1][2:])
  12. if __name__ == '__main__':
  13. main()