Best commands In Linux|Pipe| and Redirection commands|How to use pipe & redirection command|
we can use |for joining and executing multiple commands together. we can use pipe (|) is used for joining two linux shell commands and execute together command2 | command3 in the above statement the command2 gets executed first and the output produced by command2 will be passed as an input to the command3. cat pack.txt | wc -l ls -l | wc -l who | wc -l ps -ef | grep firefox how many no of process are running by user ps -ef | grep -w "sai" | wc -l redirections:- ------------------------------------------------------------ redirections are used for redirecting standard input or output of the command. There are 2 types of redirections are there. 1. = input redirection 2. = output redirection Usually a command writes the output onto the standard console if you want to write the output of a command to a different destination like a file then use output redirection copy contents of two text files into third file details1.txt venky 100 praven 200 suresh 300 details2.txt yuvi 400 hemant 900 bala 200 totaldetails.txt teja 800 cat details1.txt details2.txt totaldetails.txt
Comments
Post a Comment