The Unix Tools is Your Friends

Source: Internet
Author: User

The Unix Tools is Your Friends

Diomidis Spinellis

IF, on MY-EXILE on A DESERT Island, I had to choose between an IDE and the Unix toolchest, I ' d pick the UNIX tools Without a second thought. Here is the reasons why you should become proficient with Unix tools.
First, IDEs target specific languages, while the Unix tools can work with anything that appears in textual form. In today's development environment, where new languages and notations spring up every year, learning to work in the Unix W Ay is a investment that would pay off time and again.
Furthermore, while IDEs offer just the commands their developers conceived, with Unix tools can perform any task C An imagine. Think of them as (classic pre-bionicle) Lego blocks:you Create your own commands simply by combining the small but Versat Ile Unix Tools. For instance, the following sequence are a text-based implementation of Cunningham ' s signature analysis-a sequence of each File ' s semicolons, braces, and quotes, which can reveal a lot about the file ' s contents:

    forindo        echo"$i: "        ‘s/[^"{};]//g‘$i-d‘\n‘echodone

In addition, each IDE operation you learn are specific to that given task-for instance, adding a new step in a project ' s de Bug build configuration. By Con-trast, the sharpening your Unix tool skills makes you to effective at any task. As an example, I ' ve employed the SED tool used in the preceding command sequence to morph a project ' s build for Cross-comp Iling on multiple processor architectures.
?? 176 things every Programmer should Know
??????????????? Unix tools were developed in the when a multiuser computer had 128KB of RAM. The ingenuity that went to their design means that nowadays they can handle huge data sets extremely efficiently. Most of the tools work like filters, processing just a single line at the time, meaning that there are no upper limit in the Amoun T of data they can handle. Want to search for the number of edits stored in the half-terabyte Chinese Wikipedia dump? A Simple invocation of
grep ' | Wc–l
Would give you the answer without sweat. If you find a command sequence gen-erally useful, you can easily the it into a shell script, using some uniquely Powe Rful programming constructs, such as piping data into loops and condi-tionals. Even more impressively, Unix commands executing as pipelines, like the preceding one, would naturally distribute their load Among the many pro-cessing units of modern multicore CPUs.
The small-is-beautiful provenance and open source implementations of the Unix tools make them ubiquitously available, even On resource-constrained platforms, like my set-top media Player or DSL router. Such devices is unlikely to offer a powerful graphical user interface, but they often include the BusyBox application, WH Ich provides the most commonly used tools. And if you is developing on Windows, the Cygwin environment offers all imag-inable Unix tools, both as executables a nd in source code form.
Finally, if none of the available tools matches your needs, it's very easy-to-extend the world of the Unix tools. Just Write a program (in any language you fancy) that plays by a few simple Rules:your program should perform Just a sing Le task; It should read data as text lines from its standard input; And it should dis-play its results unadorned by headers and the other noise on its standard output. Parameters affecting the tool ' s operation is given in the command line. Fol-low these rules, and "yours is the Earth and everything that's in it."

The Unix Tools is Your Friends

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.