SlideShare a Scribd company logo
1 of 5
Welcome to TechGurukul
Please Like & Subscribe our channel & Press Bell icons & be updated
dwivedishashwat@gmail.com
Linux Command Series:
[Running multiple commands]
Learning Linux command theory and practical
Running Multiple command in one line
Some time we need to run multiple command at once, for this we have various
option to separate our list of commands. These separators has different effect on
execution.
We have following operators to separate the commands
1. &&(and) : True if preceding command returns true value
2. ||(or) : Runs all the commands
3. ;(semi-colon) : Run Commands sequentially
4. & (ampersand): Run a command in background
Example running command
1. false || echo "This will Print/run"
This will Print
[ -f file1 ] || echo "File does not Exist: This will return false and this will
print"
2. true || echo "This will not print/run"
[ -f file ] || echo "File Exist: This will return true and this will not print"
3. true && echo "This will print/run"
This will print
[ -f file ] && echo "File does Exist: This will return true and this will print"
4. false && echo "This will not print/run"
[ -f file1 ] && echo "File does not Exist: This will return false and this will
not print"
5. false ; echo "This will always Print/run"
This will always run
[ -f file1 ];[ -f file ];echo "This will bring sequentially”
6. example_shell_script.sh &
Above script will run in background
Thanks For Watching TechGurukul
Please support our channel by just liking Subscribing and pressing bell icon to
keep in touch
dwivedishashwat@gmail.com

More Related Content

Similar to Command Seperators.pptx

Notes2
Notes2Notes2
Notes2
hccit
 
L lpic1-v3-103-1-pdf
L lpic1-v3-103-1-pdfL lpic1-v3-103-1-pdf
L lpic1-v3-103-1-pdf
hellojdr
 
Linux introductory-course-day-1
Linux introductory-course-day-1Linux introductory-course-day-1
Linux introductory-course-day-1
Julio Pulido
 
Basics of Batch Scripting
Basics of Batch ScriptingBasics of Batch Scripting
Basics of Batch Scripting
Arik Fletcher
 

Similar to Command Seperators.pptx (20)

Loops in Python.pptx
Loops in Python.pptxLoops in Python.pptx
Loops in Python.pptx
 
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdfLearn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
 
Notes2
Notes2Notes2
Notes2
 
Unix
UnixUnix
Unix
 
L lpic1-v3-103-1-pdf
L lpic1-v3-103-1-pdfL lpic1-v3-103-1-pdf
L lpic1-v3-103-1-pdf
 
A tutorial introduction to the unix text editor ed
A tutorial introduction to the unix text editor edA tutorial introduction to the unix text editor ed
A tutorial introduction to the unix text editor ed
 
Basics of shell programming
Basics of shell programmingBasics of shell programming
Basics of shell programming
 
Basics of shell programming
Basics of shell programmingBasics of shell programming
Basics of shell programming
 
dotor.pdf
dotor.pdfdotor.pdf
dotor.pdf
 
Natural language processing open seminar For Tensorflow usage
Natural language processing open seminar For Tensorflow usageNatural language processing open seminar For Tensorflow usage
Natural language processing open seminar For Tensorflow usage
 
OS.pdf
OS.pdfOS.pdf
OS.pdf
 
Slides
SlidesSlides
Slides
 
"PHP from soup to nuts" -- lab exercises
"PHP from soup to nuts" -- lab exercises"PHP from soup to nuts" -- lab exercises
"PHP from soup to nuts" -- lab exercises
 
Linux introductory-course-day-1
Linux introductory-course-day-1Linux introductory-course-day-1
Linux introductory-course-day-1
 
Basics of Batch Scripting
Basics of Batch ScriptingBasics of Batch Scripting
Basics of Batch Scripting
 
Shell Programming_Module2_Part2.pptx.pdf
Shell Programming_Module2_Part2.pptx.pdfShell Programming_Module2_Part2.pptx.pdf
Shell Programming_Module2_Part2.pptx.pdf
 
Unixscripting
UnixscriptingUnixscripting
Unixscripting
 
Osp2.pdf
Osp2.pdfOsp2.pdf
Osp2.pdf
 
Linux commands
Linux commandsLinux commands
Linux commands
 
NYPHP March 2009 Presentation
NYPHP March 2009 PresentationNYPHP March 2009 Presentation
NYPHP March 2009 Presentation
 

More from Shashwat Shriparv

LibreOffice 7.3.pptx
LibreOffice 7.3.pptxLibreOffice 7.3.pptx
LibreOffice 7.3.pptx
Shashwat Shriparv
 

More from Shashwat Shriparv (20)

Learning Linux Series Administrator Commands.pptx
Learning Linux Series Administrator Commands.pptxLearning Linux Series Administrator Commands.pptx
Learning Linux Series Administrator Commands.pptx
 
LibreOffice 7.3.pptx
LibreOffice 7.3.pptxLibreOffice 7.3.pptx
LibreOffice 7.3.pptx
 
Kerberos Architecture.pptx
Kerberos Architecture.pptxKerberos Architecture.pptx
Kerberos Architecture.pptx
 
Suspending a Process in Linux.pptx
Suspending a Process in Linux.pptxSuspending a Process in Linux.pptx
Suspending a Process in Linux.pptx
 
Kerberos Architecture.pptx
Kerberos Architecture.pptxKerberos Architecture.pptx
Kerberos Architecture.pptx
 
Upgrading hadoop
Upgrading hadoopUpgrading hadoop
Upgrading hadoop
 
Hadoop migration and upgradation
Hadoop migration and upgradationHadoop migration and upgradation
Hadoop migration and upgradation
 
R language introduction
R language introductionR language introduction
R language introduction
 
Hive query optimization infinity
Hive query optimization infinityHive query optimization infinity
Hive query optimization infinity
 
H base introduction & development
H base introduction & developmentH base introduction & development
H base introduction & development
 
Hbase interact with shell
Hbase interact with shellHbase interact with shell
Hbase interact with shell
 
H base development
H base developmentH base development
H base development
 
Hbase
HbaseHbase
Hbase
 
H base
H baseH base
H base
 
My sql
My sqlMy sql
My sql
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
 
Introduction to apache hadoop
Introduction to apache hadoopIntroduction to apache hadoop
Introduction to apache hadoop
 
Next generation technology
Next generation technologyNext generation technology
Next generation technology
 
Configure h base hadoop and hbase client
Configure h base hadoop and hbase clientConfigure h base hadoop and hbase client
Configure h base hadoop and hbase client
 

Recently uploaded

Recently uploaded (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Command Seperators.pptx

  • 1. Welcome to TechGurukul Please Like & Subscribe our channel & Press Bell icons & be updated dwivedishashwat@gmail.com
  • 2. Linux Command Series: [Running multiple commands] Learning Linux command theory and practical
  • 3. Running Multiple command in one line Some time we need to run multiple command at once, for this we have various option to separate our list of commands. These separators has different effect on execution. We have following operators to separate the commands 1. &&(and) : True if preceding command returns true value 2. ||(or) : Runs all the commands 3. ;(semi-colon) : Run Commands sequentially 4. & (ampersand): Run a command in background
  • 4. Example running command 1. false || echo "This will Print/run" This will Print [ -f file1 ] || echo "File does not Exist: This will return false and this will print" 2. true || echo "This will not print/run" [ -f file ] || echo "File Exist: This will return true and this will not print" 3. true && echo "This will print/run" This will print [ -f file ] && echo "File does Exist: This will return true and this will print" 4. false && echo "This will not print/run" [ -f file1 ] && echo "File does not Exist: This will return false and this will not print" 5. false ; echo "This will always Print/run" This will always run [ -f file1 ];[ -f file ];echo "This will bring sequentially” 6. example_shell_script.sh & Above script will run in background
  • 5. Thanks For Watching TechGurukul Please support our channel by just liking Subscribing and pressing bell icon to keep in touch dwivedishashwat@gmail.com