写一个脚本文件checkuser,该脚本运行时带一个用户名作为参数,具体要求如下:
1)如果命令行格式不符合要求,应有错误提示信息;
2)在/etc/passwd文件中查找是否有该用户,
如有,则输出“Found in the /etc/passwd file.”
否则,输出“No such on our system”
-Write a script file checkuser, the script run-time with a user name as a parameter, and specific requirements are as follows: 1) If the command-line format does not meet the requirements, there should be error message 2) in/etc/passwd file to check if there were any users, and if so, then the output " Found in the/etc/passwd file. " Otherwise, output" No such on our system "
自己制作usb-linux系统收集的资料和经验总结,希望对大家有用。-To produce their own usb-linux systematic collection of information and lessons learned, want to be useful to everyone.
包含几个用不同方式(共享内存、socket、FIFO、消息队列等)实现进程通信的小程序,包含详细注释,足以解释各种方式进程通信的实现原理和编程方法-Contains a number of different ways (shared memory, socket, FIFO, message queue, etc.) to achieve the process of the small communications program, including detailed notes, are sufficient to explain the various ways the realization of the process of communication theory and programming methods
将需要公开的接口用一个句柄类封装起来,调用者只通过封装的句柄类来调用实现, 这样,将调用与实现隔离开来,或者说只让调用看到它所需要看到的接口。这样的话,只要 保证接口不变,那么实现代码的中要添加一些变量,函数,将不会影响到调用者。-will require an open interface with a handle Packaging category, called only by the Packaging category to handle Call, which would call and to achieve separation, or call only need to see it to see the interface. So, as long as the guarantee the same interface, then the realization of the code necessary to add some variables, function and will not affect the person to call.
对内存的分配、释放和使用进行检查,以发现不合法指针,减少程序BUG- To the memory assignment, the release and the use carry on the
inspection, discovered the illegal indicator, reduces procedure
BUG