Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-2496

RH124-735: Grading script hungs instead of failing if grep can't find any coincidence of `/opt/review5-size`in the file

XMLWordPrintable

    • en-US (English)

      URL: https://rol.redhat.com/rol/app/courses/rh124-9.0/pages/ch17s06
      Reporter RHNID: carias@redhat.com
      Section: 6 - Lab: Mount File Systems and Find Files
      Language: en-US (English)|
      Workaround: command="grep " + _comp_review5_file3 + " " + _comp_review5_txt3 + "; \ if [ $? -eq 0 ]; \
      then wc -c $(grep " + _comp_review5_file3 + " " + _comp_review5_txt3 + ") | \
      awk '

      { print $1}'; \
      else exit 1; fi",

      Description: The grading scrip waits for-ever to the wc -c command to end.





      When the word is in the file, it works fine, but if I change it for anything else, it will be hung.

       



       
      
      

      # Workaround
      command="grep " + _comp_review5_file3 + " " + _comp_review5_txt3 + "; \
      if [ $? -eq 0 ]; \
      then wc -c $(grep " + _comp_review5_file3 + " " + _comp_review5_txt3 + ") | \
      awk '{ print $1}

      '; \
      else exit 1; fi",

      
      

       

       

        1. image-2022-08-31-18-08-28-964.png
          22 kB
          Carlos Arias
        2. image-2022-08-31-18-09-02-814.png
          24 kB
          Carlos Arias
        3. image-2022-08-31-18-10-53-464.png
          19 kB
          Carlos Arias

            glsbugs-hybridcloud@redhat.com PTL - RHEL Team
            carias@redhat.com Carlos Arias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: