NetProgrammingHelp.com
Asp.Net,C#,Ajax,Sql server,silverlight,Javascript codes exambles articles,Programming exambles

Recent Posts

  • How to declare/use global constants (enum’s) in javascript ajax function
  • Silverlight Data Binding OneWay TwoWay Asp.Net C# XAML
  • Accessing Executing Running Stored Procedure/Function/Package Using Linq Silverlight Xaml
  • Creating/Developing Silverlight Data Driven Applications Using Wcf Linq Asp.Net C#
  • Deploying Manually Publish XBAP Wpf Browser Application in IIS Asp.Net C# XAML
  • Creating Server and client using remoting asp.net c#
  • Create/Build wcf autocomplete/autoextender textbox using database linq c# asp.net
  • Essentials for Creating/Developing/Programming silverlight project tools wpf xaml
  • Working with xml data type variable sql server 2008 asp.net c#
  • Encrypting Stored Procedure sql server 2008 asp.net c#
  • Pattern matching with AWK

    Posted by James Categorized Under: UNIX/AWK Add Comments

    Introduction:
    AWK is the excellent tool for processing data which is in the form of rows and columns.

    Main:
    Common synatx for awk pattern matching is,

    awk ‘/pattern/{print}’

    for ex if you wants to print lines starting with “1″ in file sample.txt:

    sample.txt:
    ———–
    1,2,3,4,5,6,7,8
    11,21.23,34,55,55
    21,4,35,6,7,54,45
    12,4,55666,78

    The awk command,
    awk ‘/1/ {print}’ sample.txt

    Result:
    *******
    1,2,3,4,5,6,7,8

    Conclusion:
    Hope this helps,
    Happy Coding.

    Leave a Reply