SlideShare a Scribd company logo
bhatvijetha
 Pipe is a mechanism in which the output of one
command can be redirected as input to another
command.
 General format is,
Command1|command2
The output of command1 is sent to command2
as input.
Example:$ls |more
The output of the command ls is sent to the
more command as input.
The directory listing of the current directory is
displayed page by page.
The following two command group displays the total
number of users who are currently logged ion the
system.
$who > userlist.txt
Wc –l userlist.txt
 Redirection
Linux treats the keyboard as the standard input (value 0)
and terminal screen standard output (value 1) as well as
standard error(value2).
Redirection inputs:
The < symbol is used to redirect inputs.
Example
$cat < file.txt
File.txt takes input command cat.
Redirecting outptuts:
The > symbol is used to redirect outputs.
$ ls >list.doc
 Redirecting error messages:
The ‘2>’ symbol is used to redirect error messages.
Example :
$cat list1.doc
If there is no file named list1.doc in the current
directory then the error messages is sent to the
standard error device.
 Filters
There are some linux commands that accept input
from standard input or files,perform some
manipulation on it and produce some output to the
standard output.
Since these commands perform filtering operations
on data ,they are called as filters.
 Sort
This command sorts the contents of a given file based on
ASCII values of characters.
General format is,
Sort [options] <filename>
Where options can be,
-m <filelist> merges sorted files specified in <filelist>.
-o <filename> stores output in the specified
<filename>.
-r sorts the content in reverse order.
-u removes duplicate lines and displays sorted content.
-n numeric sort
Ggrep (global search for regular expression)command
is used to search specified pattern from a specified
file and displays those lines containing the pattern.
General format is,
Grep [options] pattern <filename>
Where options can be,
b ignores spaces ,tabs
I ignores distinction matching
V displays only the lines that do not match the
specified pattern.
C displays the total number of occurrence of the
pattern in the file.
N displays the resultant lines along with their line
numbers.
 Match zero or more characters.
Matches a single character.
[r1-r2] matches a single character within the ascii
range represented by the characters.
[^abcd] matches a single character which is not
a,b,c or d.
^<character>matches the lines that are beginning
with character specified in <character>.
 More command
The more command is used to display output page
by page.
More <filename>
Example:
$more a.c
This command will display the content of the file –
a.c page by page.
$ls | more
This command will display the directory listing
page by page.
 Pr
This command displays the contents of the specified
file adding with suitable header and footers.
The header part consist of last modified date and time
along with file name and page number.
General format is,
Pr [-options] <filename>
Where options can be,
-l it changes the page size to specified <number>
Of lines.
-<number> prepares the output in <number>columns.
-n numbers lines
-t turns off the heading at the to of the page.
Pipes and filters

More Related Content

What's hot

Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
Elavarasi K
 
Filepermissions in linux
Filepermissions in linuxFilepermissions in linux
Filepermissions in linux
Subashini Pandiarajan
 
Hashing
HashingHashing
Hashing
Amar Jukuntla
 
Multithreading
MultithreadingMultithreading
Multithreading
A B Shinde
 
Basic Unix
Basic UnixBasic Unix
Basic Unix
Rajesh Kumar
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
Adeel Rasheed
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventions
saranyatdr
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
sudhir singh yadav
 
Data Structure and Algorithms Hashing
Data Structure and Algorithms HashingData Structure and Algorithms Hashing
Data Structure and Algorithms Hashing
ManishPrajapati78
 
Code Optimization
Code OptimizationCode Optimization
Code Optimization
Akhil Kaushik
 
Input output redirection linux
Input output redirection linuxInput output redirection linux
Input output redirection linux
Tanishq Soni
 
Vi editor
Vi editorVi editor
Vi editor
Ramakrishna kapa
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
United International University
 
Demand paging
Demand pagingDemand paging
Demand paging
Trinity Dwarka
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
Meghaj Mallick
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating systemtittuajay
 
INTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptxINTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptx
LECO9
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and Packages
Damian T. Gordon
 

What's hot (20)

Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
 
Filepermissions in linux
Filepermissions in linuxFilepermissions in linux
Filepermissions in linux
 
Hashing
HashingHashing
Hashing
 
Multithreading
MultithreadingMultithreading
Multithreading
 
Basic Unix
Basic UnixBasic Unix
Basic Unix
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventions
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
 
File handling in c
File handling in cFile handling in c
File handling in c
 
Data Structure and Algorithms Hashing
Data Structure and Algorithms HashingData Structure and Algorithms Hashing
Data Structure and Algorithms Hashing
 
Code Optimization
Code OptimizationCode Optimization
Code Optimization
 
Input output redirection linux
Input output redirection linuxInput output redirection linux
Input output redirection linux
 
Vi editor
Vi editorVi editor
Vi editor
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
 
INTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptxINTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptx
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and Packages
 

Similar to Pipes and filters

Pipes and filters
Pipes and filtersPipes and filters
Pipes and filters
vijethabhat85
 
Handling Files Under Unix.pptx
Handling Files Under Unix.pptxHandling Files Under Unix.pptx
Handling Files Under Unix.pptx
Harsha Patel
 
Handling Files Under Unix.pptx
Handling Files Under Unix.pptxHandling Files Under Unix.pptx
Handling Files Under Unix.pptx
Harsha Patel
 
Unix Tutorial
Unix TutorialUnix Tutorial
Unix Tutorial
Sanjay Saluth
 
Python programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operationsPython programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operations
Megha V
 
II BCA OS pipes and filters.pptx
II BCA OS pipes and filters.pptxII BCA OS pipes and filters.pptx
II BCA OS pipes and filters.pptx
Savitha74
 
Spsl II unit
Spsl   II unitSpsl   II unit
Spsl II unit
Sasidhar Kothuru
 
Doscommands
DoscommandsDoscommands
Doscommands
DoscommandsDoscommands
DoscommandsDurgule
 
For this assignment, download the A6 code pack. This zip fil.docx
For this assignment, download the A6 code pack. This zip fil.docxFor this assignment, download the A6 code pack. This zip fil.docx
For this assignment, download the A6 code pack. This zip fil.docx
alfred4lewis58146
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
home
 
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling
Ahmed El-Arabawy
 
Compilers Design
Compilers DesignCompilers Design
Compilers Design
Akshaya Arunan
 
You are required to write an interactive C program that prompts the .pdf
You are required to write an interactive C program that prompts the .pdfYou are required to write an interactive C program that prompts the .pdf
You are required to write an interactive C program that prompts the .pdf
arrowcomputers8700
 
Introduction to R for beginners
Introduction to R for beginnersIntroduction to R for beginners
Introduction to R for beginners
Abishek Purushothaman
 
Unit 7 standard i o
Unit 7 standard i oUnit 7 standard i o
Unit 7 standard i oroot_fibo
 
Data Analysis with R (combined slides)
Data Analysis with R (combined slides)Data Analysis with R (combined slides)
Data Analysis with R (combined slides)
Guy Lebanon
 
Perl Basics with Examples
Perl Basics with ExamplesPerl Basics with Examples
Perl Basics with Examples
Nithin Kumar Singani
 
Python Basics
Python BasicsPython Basics
Python Basics
tusharpanda88
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
home
 

Similar to Pipes and filters (20)

Pipes and filters
Pipes and filtersPipes and filters
Pipes and filters
 
Handling Files Under Unix.pptx
Handling Files Under Unix.pptxHandling Files Under Unix.pptx
Handling Files Under Unix.pptx
 
Handling Files Under Unix.pptx
Handling Files Under Unix.pptxHandling Files Under Unix.pptx
Handling Files Under Unix.pptx
 
Unix Tutorial
Unix TutorialUnix Tutorial
Unix Tutorial
 
Python programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operationsPython programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operations
 
II BCA OS pipes and filters.pptx
II BCA OS pipes and filters.pptxII BCA OS pipes and filters.pptx
II BCA OS pipes and filters.pptx
 
Spsl II unit
Spsl   II unitSpsl   II unit
Spsl II unit
 
Doscommands
DoscommandsDoscommands
Doscommands
 
Doscommands
DoscommandsDoscommands
Doscommands
 
For this assignment, download the A6 code pack. This zip fil.docx
For this assignment, download the A6 code pack. This zip fil.docxFor this assignment, download the A6 code pack. This zip fil.docx
For this assignment, download the A6 code pack. This zip fil.docx
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling
 
Compilers Design
Compilers DesignCompilers Design
Compilers Design
 
You are required to write an interactive C program that prompts the .pdf
You are required to write an interactive C program that prompts the .pdfYou are required to write an interactive C program that prompts the .pdf
You are required to write an interactive C program that prompts the .pdf
 
Introduction to R for beginners
Introduction to R for beginnersIntroduction to R for beginners
Introduction to R for beginners
 
Unit 7 standard i o
Unit 7 standard i oUnit 7 standard i o
Unit 7 standard i o
 
Data Analysis with R (combined slides)
Data Analysis with R (combined slides)Data Analysis with R (combined slides)
Data Analysis with R (combined slides)
 
Perl Basics with Examples
Perl Basics with ExamplesPerl Basics with Examples
Perl Basics with Examples
 
Python Basics
Python BasicsPython Basics
Python Basics
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 

More from bhatvijetha

LINUX:Control statements in shell programming
LINUX:Control statements in shell programmingLINUX:Control statements in shell programming
LINUX:Control statements in shell programming
bhatvijetha
 
Shellvariables in Linux
Shellvariables in Linux Shellvariables in Linux
Shellvariables in Linux
bhatvijetha
 
Vi editor
Vi editorVi editor
Vi editor
bhatvijetha
 
Linux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls commandLinux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls command
bhatvijetha
 
Unix vs linux
Unix vs linuxUnix vs linux
Unix vs linux
bhatvijetha
 
Linux commands part4
Linux commands part4Linux commands part4
Linux commands part4
bhatvijetha
 
Linux commands part3
Linux commands part3Linux commands part3
Linux commands part3
bhatvijetha
 
Linux commands part -2
Linux commands part -2Linux commands part -2
Linux commands part -2
bhatvijetha
 
Linux commands
Linux commandsLinux commands
Linux commands
bhatvijetha
 
Introduction to unix
Introduction to unixIntroduction to unix
Introduction to unix
bhatvijetha
 

More from bhatvijetha (10)

LINUX:Control statements in shell programming
LINUX:Control statements in shell programmingLINUX:Control statements in shell programming
LINUX:Control statements in shell programming
 
Shellvariables in Linux
Shellvariables in Linux Shellvariables in Linux
Shellvariables in Linux
 
Vi editor
Vi editorVi editor
Vi editor
 
Linux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls commandLinux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls command
 
Unix vs linux
Unix vs linuxUnix vs linux
Unix vs linux
 
Linux commands part4
Linux commands part4Linux commands part4
Linux commands part4
 
Linux commands part3
Linux commands part3Linux commands part3
Linux commands part3
 
Linux commands part -2
Linux commands part -2Linux commands part -2
Linux commands part -2
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Introduction to unix
Introduction to unixIntroduction to unix
Introduction to unix
 

Recently uploaded

Reflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPointReflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPoint
amberjdewit93
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
NelTorrente
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
MERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDFMERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDF
scholarhattraining
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Reflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdfReflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdf
amberjdewit93
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 

Recently uploaded (20)

Reflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPointReflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPoint
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
MERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDFMERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDF
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Reflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdfReflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 

Pipes and filters

  • 2.  Pipe is a mechanism in which the output of one command can be redirected as input to another command.  General format is, Command1|command2 The output of command1 is sent to command2 as input. Example:$ls |more The output of the command ls is sent to the more command as input.
  • 3. The directory listing of the current directory is displayed page by page. The following two command group displays the total number of users who are currently logged ion the system. $who > userlist.txt Wc –l userlist.txt
  • 4.  Redirection Linux treats the keyboard as the standard input (value 0) and terminal screen standard output (value 1) as well as standard error(value2). Redirection inputs: The < symbol is used to redirect inputs. Example $cat < file.txt File.txt takes input command cat. Redirecting outptuts: The > symbol is used to redirect outputs. $ ls >list.doc
  • 5.  Redirecting error messages: The ‘2>’ symbol is used to redirect error messages. Example : $cat list1.doc If there is no file named list1.doc in the current directory then the error messages is sent to the standard error device.
  • 6.  Filters There are some linux commands that accept input from standard input or files,perform some manipulation on it and produce some output to the standard output. Since these commands perform filtering operations on data ,they are called as filters.
  • 7.  Sort This command sorts the contents of a given file based on ASCII values of characters. General format is, Sort [options] <filename> Where options can be, -m <filelist> merges sorted files specified in <filelist>. -o <filename> stores output in the specified <filename>. -r sorts the content in reverse order. -u removes duplicate lines and displays sorted content. -n numeric sort
  • 8. Ggrep (global search for regular expression)command is used to search specified pattern from a specified file and displays those lines containing the pattern. General format is, Grep [options] pattern <filename> Where options can be, b ignores spaces ,tabs I ignores distinction matching V displays only the lines that do not match the specified pattern. C displays the total number of occurrence of the pattern in the file. N displays the resultant lines along with their line numbers.
  • 9.  Match zero or more characters. Matches a single character. [r1-r2] matches a single character within the ascii range represented by the characters. [^abcd] matches a single character which is not a,b,c or d. ^<character>matches the lines that are beginning with character specified in <character>.
  • 10.  More command The more command is used to display output page by page. More <filename> Example: $more a.c This command will display the content of the file – a.c page by page. $ls | more This command will display the directory listing page by page.
  • 11.  Pr This command displays the contents of the specified file adding with suitable header and footers. The header part consist of last modified date and time along with file name and page number. General format is, Pr [-options] <filename> Where options can be, -l it changes the page size to specified <number> Of lines. -<number> prepares the output in <number>columns. -n numbers lines -t turns off the heading at the to of the page.