grep Command

The grep Command The grep command searches a file or files for lines that have a certain pattern. Syntax Options Sr. No. Option & Description 1. -v (Prints all lines that do not match pattern.) 2. -n (Prints the matched line and its line number.) 3. -l (Prints only the…

Shell While Loops

While Loops The while loop enables you to execute a set of commands repeatedly until some condition occurs. It is usually used when you need to manipulate the value of a variable repeatedly. Syntax Scripts while.sh passwd.sh nameserver.sh