SlideShare a Scribd company logo
2
Most read
4
Most read
9
Most read
TOPICS
OF
Report Printing With AWK
Submited To: Submited By:
Prof: Ram Kuman Paliwal Yogesh Bansal
Udayveer Singh narwaria
 Awk stands for the names of its authors “Aho, Weinberger,
and Kernighan”.
 Awk is a programming language which allows easy manipulation
of structured data and the generation of formatted reports.
 Awk is one of the most powerful tools in Unix used for processing
the rows and columns in a file.
 Awk has built in string functions and associative arrays.
 Conditional Execution
 Looping Statements
 Numeric Variables
 String Variables
 Regular Expressions
Awk views a text file as records and
fields.
 Awk reads the input files one line at a time.
 If no pattern matches, no action will be performed.
 Each statement in Actions should be delimited by
semicolon.
 The search pattern is not given, then Awk performs the
given actions for each line of the input.
Syntex Of AWK:
awk [options] ‘script’ file(s)
awk [options] –f scriptfile file(s)
Options:
-F - To change input field separator
-f - To name script file
 awk supports two types of buffers:
(a) field buffer:
one for each fields in the current record.
names: $1, $2, …
(b) record buffer :
$0 holds the entire record
NF Number of fields in current record
NR Number of the current record
% cat employ
Id Name DoB
1001 Aman 5/12/1993
1002 Sonu 11/4/1994
1003 Ravi 7/22/1992
1004 Vinay 9/23/1995
% awk '{print NR , $0}' employ
Id Name DoB
1 1001 Aman 5/12/1993
2 1002 Sonu 11/4/1994
3 1003 Ravi 7/22/1992
4 1004 Vinay 9/23/1995
% cat employ
Id Name DoB
1001 Aman 5/12/1993
1002 Sonu 11/4/1994
1003 Ravi 7/22/1992
1004 Vinay 9/23/1995
% awk '{print NR , $1,$2}' employ
Id Name
1 1001 Aman
2 1002 Sonu
3 1003 Ravi
4 1004 Vinay
% awk –F: '/v$/' employ
Id Name DoB
1003 Ravi 7/22/1992
1004 Vinay 9/23/1995

More Related Content

PPTX
heap Sort Algorithm
PPTX
Lexical analyzer generator lex
PPTX
closure properties of regular language.pptx
PPTX
Quick sort-Data Structure
PPTX
1.1. the central concepts of automata theory
PPT
Shell and its types in LINUX
ODP
Perl Introduction
PPT
Heap sort
heap Sort Algorithm
Lexical analyzer generator lex
closure properties of regular language.pptx
Quick sort-Data Structure
1.1. the central concepts of automata theory
Shell and its types in LINUX
Perl Introduction
Heap sort

What's hot (20)

PPTX
Operating system memory management
PPTX
Windows memory management
PPTX
Compiler Design Unit 4
PDF
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
PPTX
Operator precedance parsing
PPT
Turing Machine
PPT
Osi model 7 Layers
PPTX
Water jug problem ai part 6
PPTX
Structure of the compiler
PPTX
Knapsack Problem
PPT
PPTX
Address resolution protocol (ARP)
PPT
Divide and conquer
PPTX
Ipv4 and Ipv6
PPT
Pass 1 flowchart
DOCX
Data types and operators in vb
PPTX
Osi reference model
PDF
Introduction to OpenMP
PPTX
Mac addresses(media access control)
PPT
TCP/IP Network ppt
Operating system memory management
Windows memory management
Compiler Design Unit 4
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
Operator precedance parsing
Turing Machine
Osi model 7 Layers
Water jug problem ai part 6
Structure of the compiler
Knapsack Problem
Address resolution protocol (ARP)
Divide and conquer
Ipv4 and Ipv6
Pass 1 flowchart
Data types and operators in vb
Osi reference model
Introduction to OpenMP
Mac addresses(media access control)
TCP/IP Network ppt
Ad

Viewers also liked (20)

PPT
Learning sed and awk
PPT
Unix command-line tools
PPS
Unix - Class7 - awk
PPT
Unix day4 v1.3
PPT
Testingtechniques And Strategy
ODP
Linux 101 Exploring Linux OS
PDF
Awk Unix Utility Explained
PPT
Unix day3 v1.3
KEY
Advanced Shell Scripting
PPT
PPT
Unix day2 v1.3
ODP
What Linux is what you should also have on your computer.
PPT
unix crontab basics
PPSX
Awk essentials
PPS
UNIX - Class6 - sed - Detail
PDF
Sed Unix Utility Explained
PDF
Shell script-sec
PPT
Chap06
PDF
Linux fundamental - Chap 15 Job Scheduling
PPT
Regular Expressions grep and egrep
Learning sed and awk
Unix command-line tools
Unix - Class7 - awk
Unix day4 v1.3
Testingtechniques And Strategy
Linux 101 Exploring Linux OS
Awk Unix Utility Explained
Unix day3 v1.3
Advanced Shell Scripting
Unix day2 v1.3
What Linux is what you should also have on your computer.
unix crontab basics
Awk essentials
UNIX - Class6 - sed - Detail
Sed Unix Utility Explained
Shell script-sec
Chap06
Linux fundamental - Chap 15 Job Scheduling
Regular Expressions grep and egrep
Ad

Similar to Presentation of awk (20)

PDF
Awk-An Advanced Filter
PDF
Linux class 15 26 oct 2021
PPT
Lec_11.ppt
DOCX
Awk programming
PDF
Awk A Pattern Scanning And Processing Language
PPTX
Introduction to AWK utility on unix.pptx
PPTX
VI Editor
PPT
awk_intro.ppt
PDF
Linux intro 5 extra: awk
PDF
Awk --- A Pattern Scanning And Processing Language (Second Edition)
PDF
Introduction to AWK
PDF
Awk Introduction
PDF
[POSS 2019] Learn AWK in 15 minutes
PDF
#OSSPARIS19 - Learn AWK in 15 minutes - MAXIME BESSON, Worteks
PPTX
DOCX
Introduction to Unix - POS420Unix  Lab Exercise Week 3 BTo.docx
PDF
Unix interview questions
DOC
PDF
awkbash quick ref for Red hat Linux admin
Awk-An Advanced Filter
Linux class 15 26 oct 2021
Lec_11.ppt
Awk programming
Awk A Pattern Scanning And Processing Language
Introduction to AWK utility on unix.pptx
VI Editor
awk_intro.ppt
Linux intro 5 extra: awk
Awk --- A Pattern Scanning And Processing Language (Second Edition)
Introduction to AWK
Awk Introduction
[POSS 2019] Learn AWK in 15 minutes
#OSSPARIS19 - Learn AWK in 15 minutes - MAXIME BESSON, Worteks
Introduction to Unix - POS420Unix  Lab Exercise Week 3 BTo.docx
Unix interview questions
awkbash quick ref for Red hat Linux admin

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Spectroscopy.pptx food analysis technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
The AUB Centre for AI in Media Proposal.docx
Chapter 3 Spatial Domain Image Processing.pdf
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Understanding_Digital_Forensics_Presentation.pptx
Big Data Technologies - Introduction.pptx
Spectroscopy.pptx food analysis technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Reach Out and Touch Someone: Haptics and Empathic Computing
MIND Revenue Release Quarter 2 2025 Press Release
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Machine learning based COVID-19 study performance prediction
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectral efficient network and resource selection model in 5G networks
Mobile App Security Testing_ A Comprehensive Guide.pdf

Presentation of awk

  • 1. TOPICS OF Report Printing With AWK Submited To: Submited By: Prof: Ram Kuman Paliwal Yogesh Bansal Udayveer Singh narwaria
  • 2.  Awk stands for the names of its authors “Aho, Weinberger, and Kernighan”.  Awk is a programming language which allows easy manipulation of structured data and the generation of formatted reports.  Awk is one of the most powerful tools in Unix used for processing the rows and columns in a file.  Awk has built in string functions and associative arrays.
  • 3.  Conditional Execution  Looping Statements  Numeric Variables  String Variables  Regular Expressions Awk views a text file as records and fields.
  • 4.  Awk reads the input files one line at a time.  If no pattern matches, no action will be performed.  Each statement in Actions should be delimited by semicolon.  The search pattern is not given, then Awk performs the given actions for each line of the input.
  • 5. Syntex Of AWK: awk [options] ‘script’ file(s) awk [options] –f scriptfile file(s) Options: -F - To change input field separator -f - To name script file
  • 6.  awk supports two types of buffers: (a) field buffer: one for each fields in the current record. names: $1, $2, … (b) record buffer : $0 holds the entire record
  • 7. NF Number of fields in current record NR Number of the current record
  • 8. % cat employ Id Name DoB 1001 Aman 5/12/1993 1002 Sonu 11/4/1994 1003 Ravi 7/22/1992 1004 Vinay 9/23/1995 % awk '{print NR , $0}' employ Id Name DoB 1 1001 Aman 5/12/1993 2 1002 Sonu 11/4/1994 3 1003 Ravi 7/22/1992 4 1004 Vinay 9/23/1995
  • 9. % cat employ Id Name DoB 1001 Aman 5/12/1993 1002 Sonu 11/4/1994 1003 Ravi 7/22/1992 1004 Vinay 9/23/1995 % awk '{print NR , $1,$2}' employ Id Name 1 1001 Aman 2 1002 Sonu 3 1003 Ravi 4 1004 Vinay % awk –F: '/v$/' employ Id Name DoB 1003 Ravi 7/22/1992 1004 Vinay 9/23/1995