in reply to Re: Matching patterns in condisional statements
in thread Matching patterns in condisional statements

I cannot see why you would need a data sample since all I am doing is matching a string pattern with the file Header, so I can identify the file type. The string I am looking for can be found in the code. In the future I will use Perl, rather than shell to read the file. thank you. Originally, I thought that $head was storing the first line/header that I expected since it was printing to the screen, but it was actually storing in stdout. An issue that has been addressed and fixed my issue. Thank you for your input.
  • Comment on Re^2: Matching patterns in condisional statements

Replies are listed 'Best First'.
Re^3: Matching patterns in condisional statements
by stevieb (Canon) on Jul 05, 2017 at 17:44 UTC
    I cannot see why you would need a data sample

    Because it allows for a completely reproduceable situation where someone wanting to help only has to copy/paste and not try to recreate input data by hand (and possibly get it wrong).

    Please see Short self-contained correct example.

      It's the converse. You are seeing if a then b. where a is your program and b is your problem. I think the monks want to see if b then a. ( the converse ) I'm definitely contra-positive about that.