Develop a Linux command line utility

Source: Internet
Author: User
Develop the Linux command line utility-General Linux technology-Linux programming and kernel information. The following is a detailed description. This article describes how to write a Linux command line utility that is simple enough for end users. This article begins with an overview of reliable command line best practices and ends with a detailed study of an effective page selection tool, providing you with the background knowledge required to write your own utility.

This article demonstrates how to compile a Linux command line utility similar to standard commands such as cat, ls, pr, and mv. I selected a utility named selpg, which represents SELect PaGes. Selpg allows you to specify the range of pages extracted from input text, which can come from a file or another process. Selpg is created based on the actual conventions for creating commands in Linux. these conventions include:

Independent work
Work as a component in the command pipeline (by reading standard input or file name parameters, and writing to standard output and standard errors)
Command line options for modifying behaviors

IBM documentation, full text in http://www.ibm.com/developerworks/cn/linux/shell/clutil/
Related Article

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: info-contact@alibabacloud.com 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.