Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> OS >> Unix >> Linux >> How to run awk program file from command line or shell script



1.      # awk -f <awk_program_file> <file_to_awk>
        or
        # awk '<awk_program_code>' <file_to_awk>

2.      # awk -F<field_separator_char> -f <awk_program_file> <file_to_awk>
        or
        # awk -F<field_separator_char> '<awk_program_code>' <file_to_awk>


Examples:

        gawk '{ sum +=  }; END { print sum }' file

        gawk -F: '{ print  }' /etc/passwd

 



[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]