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     - Optimized to minimize the installation of CentOS 5.8 (Linux)

- CentOS7 + Redis Live Installation and Configuration (Linux)

- Database Blob data type conversion String (Programming)

- CentOS 6.5 installation and deployment SVN 1.8.10 (Linux)

- How to Install 3.16.7 CKT2 kernel in Ubuntu 14.10, Ubuntu 14.04 and its derivative versions (Linux)

- How SSHfs mount a remote file system on Linux (Linux)

- Ubuntu 14.04 build Gitlab (Linux)

- [Errno 4] IOError: [Errno ftp error] with yum appears as a workaround (Linux)

- How to upgrade Docker 1.6 on Fedora / CentOS (Server)

- Python image processing library (PIL) to install and simple to use (Linux)

- C language programming entry - Common operators (Programming)

- Linux unpack the tar file to a different directory (Linux)

- Setting the RedHat9 Intrusion Detection System (Linux)

- Ubuntu clean up unnecessary disk space usage (Linux)

- DB2 manually create a library (Database)

- RHEL7.0 log system (Linux)

- Linux environment variable configuration and save places (Linux)

- Using the Linux VNC service (Server)

- Android timer use (Programming)

- How common Linux automation tasks (Server)

 
         
  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:      
 
- How do you temporarily emptied Bash environment variable before running the command on Linux (Linux)
- 64-bit Oracle Linux recompiled Hadoop-2.2.0 (Server)
- How Vim playing a mature IDE (Linux)
- Samba file sharing server set up (Server)
- Replace element and non-replaced elements of learning (Programming)
- History and Statistics tuptime use tools to view Linux server system boot time (Server)
- Linux common network tools: batch scanning of hosting services netcat (Linux)
- The method of Linux into the rescue mode (Linux)
- Swift string common method (Programming)
- Linux cron job (crontab) Examples (Linux)
- Process safety monitoring and protection under the Linux operating system (Linux)
- Android Fragment really fully resolve (Programming)
- Java, on the dfile.encoding Systemproperty (Programming)
- Linux character device - user mode and kernel mode data transfer data (Linux)
- in no backup ex: error: Xin Tourou ah backup child process has Singles DAT / US person / bin / in no backup ex (Database)
- Install Krita 2.8 on Ubuntu 13.10 / 12.04 / 12.10 (Linux)
- The headers for the current running kernel were not found when VirtualBox installation enhancements (Linux)
- configuration ssh without password under Linux (Linux)
- Generate two-dimensional code parsing code Java (Programming)
- How to troubleshoot error java.lang.NoSuchMethodError (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.