Electric Type

Multimedia

About Us

News

Help

Combining Commands

Most Unix commands are fairly simple and only have a handful of options. The beauty of Unix is that these commands can be combined to do more complex tasks. You can send the output of one command to another command for further processing by separating the commands with a pipe (|).

If you want to follow a file as it grows (tail -f) and search for a regular expression (grep), you can combine commands to achieve this. If you are searching for files in a growing error log that contains the word supermonkey you would type this:

 tail -f errorlog | grep ".*supermonkey.*" 
This tails the errorlog and then greps for the regular expression "supermonkey." The . and * are called meta-characters. The .* in this example matches any number of any character.

Back to the index.

Tutorials  

User Blogs  

Teaching Tools  

Authoring  

Design  

Programming help  

Advanced Flash  

Javascript  

Glossary  

PHP Coding  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.