You can also check this command for finding username is present or not . ------------------------------------------- getent passwd $echo username ------------------------------------------
You can also check this command for finding username is present or not . ------------------------------------------- getent passwd $echo username ------------------------------------------
Actually pipe is used to combine two or more commands i.e., the output of one command acts as an input to next command and so on.
Piping is used as a filter. Here are few examples:
e.g.: cat /etc/passwd | grep root
The standard output of cat /etc/passwd is piped into the standard input of grep command and finally, grep command display lines that belongs to user 'root'. Hence, pipe command also acts as a filter.