Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Smile [SOLVED] Regex help needed

    Hi all

    Its my first post in here so please be patient
    I am trying to use regex in perl script to detect allowed words from the file and then print output to the screen.

    As an example :

    I have text file with orders and returns :


    My question: is it possible to make sure that i am ony outputing to the screen orders based on few conditions like Item,order form e.g. online.And is it possible to have multiple matches (Item2 only diplay if ordered online etc)

    Your help is much appreciated


  2. #2
    awk '/Item2/ && /online/' file
    this will print any line with "Item2" and "online" .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts