Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I want to search a string from the output file that have given by egrep command-: I want to search a text "order" from the file of following command-: ...
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    3

    Help In egrep command

    Hi,

    I want to search a string from the output file that have given by egrep command-:

    I want to search a text "order" from the file of following command-:

    egrep -wli 'DEST = INDIA|DEST = US|DEST = AUS' *.sql

    Please help

    BR

  2. #2
    Just Joined!
    Join Date
    Apr 2011
    Posts
    6
    This command will show you the file name only in which this pattern exit.

    if you have to print the text use -wi instead of -wli.
    -l gives the file name.

    I think it will work for you.

  3. #3
    Just Joined!
    Join Date
    Jun 2011
    Posts
    3

    Need result from file by egrep command

    Quote Originally Posted by arun_nishad View Post
    This command will show you the file name only in which this pattern exit.

    if you have to print the text use -wi instead of -wli.
    -l gives the file name.

    I think it will work for you.
    Hello Arun,

    I need to find text "split" from file given by command-:

    egrep -wli 'DEST = INDIA|DEST = US|DEST = AUS' *.sql

    for example If above command give result -:

    need.sql
    pankaj.sql
    custom.sql
    order.sql

    then "split" text will be searched in these sql files.

  4. #4
    Just Joined!
    Join Date
    Apr 2011
    Posts
    6
    than use follwoing

    egrep split `egrep -liw "DEST = INDIA|DEST = US|DEST = AUS" *.sql`

  5. #5
    Just Joined!
    Join Date
    Jun 2011
    Posts
    3

    Working fine

    Quote Originally Posted by arun_nishad View Post
    than use follwoing

    egrep split `egrep -liw "DEST = INDIA|DEST = US|DEST = AUS" *.sql`
    Hello Arun,

    Now its working fine. Thanks a lot

Posting Permissions

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