Skip to main content

Best commands In Linux|Pipe| and Redirection commands|How to use pipe & redirection command|

 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

Popular posts from this blog

Linux cmp and diff commands|Linux commands for devops |difference between cmp and diff

Linux cmp and diff commands|Linux commands for devops |difference between cmp and diff CMP = command is used for comparing the byte by byte of text information of a file and outputs the first difference of the file. cat list1.txt green blue yellow white cat list2.txt green blue black white cmp list1.txt list2.txt output:- list1.txt list2.txt differ: byte 6, line 2 ------------------------------------------------------------------------------------------------------------------------------------- diff = it is used for comparting two text files and displays all the mis-matches in the files. In addition it displays special symbols helping us in understanding what we should do to make those two files identical. a = add c = change the text of the file d = delete line In addition to this it displays the mis-match lines with notation. = indicates the right side file = indicates suggestion should be applied to left side file 2,5c3 =in the left file from 2 - 5 lines should be replaced ...

Record script using bad boy tool 2020|Jmeter script recording using badboy tool and validate script|

Apache JMeter Script Recording with BadBoy|How to Record script using BadBoy tool|  Download tool :https://badboy1.software.informer.com/download/ Recordig using bad boy tool  using for mostly .net and java applications there are 3 steps to actually getting a load test running with Badboy: 1. Recording your script. 2.Parametrizing your script with a lot of users and their associated user information,  and setting think times in the script. 3.Running the script with all your users, and gathering and analyzing the results,  hopefully in a graph format.

Linux User Management Commands 2020|how to create user in Linux|switch user|add user|view user

  Linux User Management Commands 2020|how to create user in Linux|switch user|add user|view user User Management in Linux Two types of users in linux: --------------------------------------------------- 1.Root User 2.Normal User 1. Root User = There is only one root user for a Linux System and its created by default The root user has total control of the Linux System like 1. Managing all the system resources 2. File Management 3. User Management 4. Network Configurations 5. System Configurations &Software Installations 2. Normal User = Any other user added by the ROOT will becomes Normal User. They has access to his home directory only. To enter root ----------------------- sudo su - (or) sudo su root To add user --------------------- adduser username To view user ---------------------- id username switch user ----------------------- suso su username switch user via gui ----------------------- super user ------------------- sudo su - To see how many u...