0% found this document useful (0 votes)
21 views9 pages

Presentation For Os

The document provides an overview of the AWK command, including its uses, syntax, and internal variables. It also outlines a project timeline for learning AWK that involves changing directories, creating files and folders, and using AWK commands to view file contents.

Uploaded by

yomna mohamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views9 pages

Presentation For Os

The document provides an overview of the AWK command, including its uses, syntax, and internal variables. It also outlines a project timeline for learning AWK that involves changing directories, creating files and folders, and using AWK commands to view file contents.

Uploaded by

yomna mohamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

CS

Department

OPERATING SYSTEM

PROJECT
Presented by: Yomna Magdy
Overview

Project Timeline
Overview About AWK
What Is AWK
Internal Variables
Syntax And Methods
Practical
About Us

Name : Yomna Magdy Mohamed


Departmant : Computer Science
Year : Fourth Year
Code : 200437
Project Timeline

01 02 03 04
OverView With
Change Directory
Write In The New Show what We Had
With CD Command Written In The File
The AWK File With Cat
and Creata A New
Command Command Line With AWK
Folder With mkdir
Command
And File With Touch
command
Overview
AWK Command
Competitive
AWK Command is a scripting language primarily used for text
processing and data extraction. It takes input from a file or
standard input, processes it line by line, and performs actions
based on user-defined patterns and actions.

Execution
It’s typically used as a data extraction and reporting tool.
Like sed and grep And Elso To Show You Files Content By
Using awk ‘{print $1}’
It Can Elso Filter Your Data And Search For A Resalt That You
Want By Using awk ‘/(The Word That You Want To Find)/’
Operations
(a) Scans a file line by line
(b) Splits each input line into fields
(c) Compares input line/fields to pattern
(d) Performs action(s) on matched lines
INTERNAL VARIABLES
FILENAME : current input file name( do not change variable name)
FR : number of the current input line (that is input line 1, 2, 3… so on, do not
change variable name)
NF : number of fields in current input line (do not change variable name)
OFS : output field separator
FS : input field separator
ORS : output record separator
RS : input record separator
SYNTAX FOR AWK COMMAND

AWK ‘{print $column num}’ --->to print a specific column


ls -l | awk ‘{print $1, $4}’ ---> to Print a specific columns
awk '/something/' ---> for filtering
awk '/^something/ {print $1;}' ---> for filtering in a specific column
awk 'BEGIN { FS=":"; }{ print $1; }' ---> to set a specific stop word
awk 'BEGIN { FS=":"; print "User\t\tname\t\tage\n--------------"; }
{print $1,"\t\t",$2,"\t\t",$3,"\t;}
END { print "---------\nFile Complete" }'
awk '$2 ~ /^value/'
awk '$2 !~ /^value/ && $1 < 5' ---> To Find Every Thing except The Value Which we
wrote
Computer
Science

THANK YOU
For watching this presentation

+201013580052

[email protected]

Computer Science Department

Code: 200437

You might also like