23 Awesome less known Linux/Unix command chaining examples

Posted by linuxnix on Jul 26, 2012 12:43 PM EDT
The Linux Juggernaut; By Surendra Anne
Mail this story
Print this story

Command chaining is a concept to execute two or more commands in one shot to increase .. productivity Reduce system resource usage(In some cases ) Short and sweet codes . In this post we will see how to use different command chaining operators available for us in an easy way. Command chaining operators & –Forking

Command chaining is a concept to execute two or more commands in one shot to increase ..

productivity Reduce system resource usage(In some cases ) Short and sweet codes . In this post we will see how to use different command chaining operators available for us in an easy way.

Command chaining operators & –Forking operator(run in background parallelly ) ; –Run multiple commands in one run, sequentially. –To combine a big command for multiple lines && –Logical AND operator || –Logical OR operator ! -NOT operator(I did not find much info on this.0) | — PIPE operator {} –Command combination operator. () –Precedence operator

& – Forking operator(AND operator): This operator is used to send a process/script/command to run background so that we can execute other commands in foreground to increase effective utilization of system resources and to speed up the script execution. This is also called as Child process creation or forking in other programming languages.

Example1: Run commands in background

$ping -c1 google.com &

Full Story

  Nav
» Read more about: Story Type: Editorial, News Story, Tutorial; Groups: Immunix, Red Hat, SCO, Slackware, Sun, SUSE, Turbolinux, Ubuntu

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.