You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
515 B

  1. #!/bin/sh
  2. copy_mode=0
  3. while true
  4. do
  5. read line
  6. if test "$copy_mode" = "0"
  7. then
  8. if echo " $line" | grep '^ Cgen=' >/dev/null 2>&1
  9. then
  10. copy_mode=1
  11. if echo " $line" | grep '^ Cgen=..' >/dev/null 2>&1
  12. then
  13. echo " $line" | sed -e 's/^ Cgen=//'
  14. fi
  15. elif echo " $line" | grep '^ =end Model=' >/dev/null 2>&1
  16. then
  17. break
  18. fi
  19. else
  20. if test " $line" = " @"
  21. then
  22. copy_mode=0
  23. echo "@"
  24. else
  25. echo " $line" | sed -e 's/^ //'
  26. fi
  27. fi
  28. done