转自 http://blog.csdn.net/todd911/article/details/8952565输入输出函数家族家族名 目的 可用于所有的流 只用于stdin和stdoutgetchar 字符输入 fgetc,get...
分类:
其他好文 时间:
2015-06-27 16:16:27
阅读次数:
216
passwd 功能:设置或修改密码常用参数:-d 删除用户密码-l 锁定账号-S,--status 显示密码状况--stdin 交互式设定加密密码例:echo “123456”| passwd –stdin username
分类:
其他好文 时间:
2015-06-26 14:52:04
阅读次数:
103
参考文章:http://www.thegeekstuff.comsed工作原理This is called as one execution cycle. Cycle continues till end of file/input is reached:
1. Read a entire line from stdin/file.
2. Removes any trailing newline...
分类:
系统相关 时间:
2015-06-25 12:28:19
阅读次数:
170
4.输入输出#! /bin/bash
# Read users input and then get his name
read -p "Please input your first name: " firstName
read -p "Please input your last name: " lastName
echo -e "Your full name is: $firstName...
分类:
系统相关 时间:
2015-06-25 10:33:32
阅读次数:
157
sortsort 命令对 File 参数指定的文件中的行排序,并将结果写到标准输出。如果 File 参数指定多个文件,那么 sort 命令将这些文件连接起来,并当作一个文件进行排序。sort语法[root@www ~]# sort [-fbMnrtuk] [file or stdin]选项与参数:-...
分类:
系统相关 时间:
2015-06-24 12:45:28
阅读次数:
209
f(i,j)=min{f(i,k)+f(k,j)+a[i]*a[k]*a[j]}(1#include#includeusing namespace std;int n,a[101],f[101][101];int main(){// freopen("codevs1966.in","r",stdin...
分类:
其他好文 时间:
2015-06-24 09:20:01
阅读次数:
111
1.read函数
调用read函数从文件去读数据,函数定义如下:
[cpp] view
plaincopy
#include
ssize_t read(int filedes, void* buff, size_t nbytes);
第一个变量代表文件描述符,如果是标准输入STDIN_FILENO
第二个变量代表从文件中读进bu...
分类:
其他好文 时间:
2015-06-22 17:54:59
阅读次数:
154
1、标准输入/输出/错误当shell启动,它继承三个文件:stdin、stdout、stderr,标准输入通常来自键盘,标准输出和标准错误通常是屏幕。标准输入/输出/错误的文件描述符为0、1、22、重定向操作符 重定向输出>> 追加输出2> 重定向错误...
分类:
其他好文 时间:
2015-06-22 06:19:13
阅读次数:
184
UNIX的文件IO都是针对文件描述符的,而标准IO的操作则是围绕流进行的。当一个流最初被创建时,它并没有定向。若在未定向的流上使用一个多字节IO函数,则将该流的定向设置为宽定向;若在未定向的流上使用一个单字节IO函数,则将该流的定向设置为字节定向。
stdio.h定义了三个标准流,stdin、stdout和stderr,分别是标准输入、标准输出和标准出错。缓冲——标准IO库提供缓冲的目的是尽可能减...
分类:
其他好文 时间:
2015-06-19 18:47:32
阅读次数:
144
scanf 语法: #include int scanf( const char *format, ... );scanf()函数根据由format(格式)指定的格式从stdin(标准输入)读取,并保存数据到其它参数. 它和printf()有点类似. format(格式)字符串由控制字符,空白字符和...
分类:
编程语言 时间:
2015-06-14 16:30:36
阅读次数:
147