Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Linux C programming and Shell Programming in the development of practical tools similarities summary     - Use SVN to automatically deploy code under Apache (Server)

- Use Python to perform system commands common usage (Programming)

- JavaScript function closures Quick Start (Programming)

- Linux Getting Started tutorial: XWindow what (Linux)

- How to configure security management services under Linux (Linux)

- Expand an existing RAID arrays and remove the failed disk in a RAID (Linux)

- Log4j configuration file Explanation (Linux)

- Oracle 10g New Features - Archive Compression (Database)

- Use smartmontools view the health status of hard disk (Linux)

- Configuring a Linux operating system security management services (Linux)

- Using IntelliJ IDEA 13 integrated development environment to build Android (Linux)

- Getting Started with Linux: Nginx Web Server How to Block Specific User Agents (UA) (Server)

- Using DOS command to change UNIX administrator password (Linux)

- String JavaScript type system (Programming)

- Create several practical points of high security PHP site (Linux)

- Oracle row and column switch to turn columns (Database)

- How to install and use the malware detection tool LMD and ClamAV antivirus engine on Linux (Linux)

- Android using SVG vector graphics to create cool animation effects (Programming)

- E: Sub-process / usr / bin / dpkg returned an error code (1) error solution (Linux)

- CentOS 7.0 Experience with previous versions (Linux)

 
         
  Linux C programming and Shell Programming in the development of practical tools similarities summary
     
  Add Date : 2018-11-21      
         
       
         
  In whois package source files mkpasswd mkpasswd.c example,

Both need to do:

(1) before running the program needs to meet its operating environment, including statements which libraries which files need to use, such as compiling C conditional, Shell programming part of the conditions to judge, such as a file exists and is executable

(2) with the flexibility and portability: full use of macro definitions or global variables (Shell only), although many of C macros are not just for the program to run further for porting, Shell many global variables can also be used script transplant

(3) need to do parameter (argument) Disclaimer: allows the user to pass those parameters to the program does not allow users to pass those parameters; parameters which are not used simultaneously, which parameters must be used

(4) to define whether the program accepts long options (--sargv)

(5) to make the user's input filter determination process, the process determination process various inputs, the illegal import and special characters

(6) control logic and user processes to avoid defects: to ensure that user input does not exceed the expected program design, such as input (string length, digital length) overflow assurance process flow and to deal with and end

(7) are linked closely with the operating system: operating system meet the system specifications and operating philosophy, such as the proper function return values, the program exits with value Accept pipeline, distinguish stdin, stdout, stderr, etc.

(8) function calls or external calls, you need to catch the exception and handle exceptions, from the user or system interrupt processing, signal processing

Do everything before (9) the implementation of core methods

(10) main function as a clear short fine, pay attention to the split function to maintain the function of the atom, the function will reuse as much as possible, with the necessary indentation

(11) standing on the shoulders of giants, to avoid duplication-create the wheel, use and maintain a consistent programming style

(12) After the program is running, wipe their own ass, before and after the program runs fully interact with the user

(13) appropriate to show off their programming skills and art of programming

(14) is sometimes necessary to pay attention to the language of international issues

(15) Statement agreements, licensing and more detailed notes, TODO, allow others to use, adapt, re-creation, etc.
     
         
       
         
  More:      
 
- Python object-oriented programming (Programming)
- How to modify the SQL Server auto-increment value and the corresponding solution (Database)
- How to download GOG games in Linux command line (Linux)
- Spark and Hadoop comparison (Server)
- Linux can modify the maximum number of open files (Linux)
- Nginx configuration support f4v video format player (Server)
- C ++ copy constructor (Programming)
- MongoDB upgrade to 2.6 (Database)
- Use GNU / Linux broadcasting of television programs (Linux)
- Boot-Repair Tool - repair of frequent start-up problems (Linux)
- Ubuntu installation under Scrapy (Linux)
- CentOS / Linux SWAP partitions added (Linux)
- Android gets the global process information and the memory used by the process (Programming)
- Local port forwarding using iptables under linux (Server)
- The ORA-01113 error is handled with BBED without archiving (Database)
- Hands to teach you to solve Ubuntu error message (Linux)
- Android Studio installed in Ubuntu 15.04 (Linux)
- Java generate two-dimensional code by Zxing (Programming)
- How to import JNI resulting .so libraries in Android Studio (Programming)
- MongoDB Installation under CentOS 6.6 (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.