popen_ex3.c
来自「unix编程实践教程代码。适合初学者」· C语言 代码 · 共 18 行
C
18 行
/* popen_ex3.c * shows how to use popen to write to a process that * reads from stdin. This program writes email to * two users. Note how easy it is to use fprintf * to format the data to send. */#include <stdio.h>main(){ FILE *fp; fp = popen( "mail admin backup", "w" ); fprintf( fp, "Error with backup!!\n" ); pclose( fp );}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?