文件名称:tail
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.37kb
-
已下载:2次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
【问题描述】
命令 tail用来打印文件中最后n行。
命令格式为:tail [-n] filename,其中:
-n :n表示需要打印的行数,省略时n的值为10。
filename :给定文件名。
如,命令tail -20 example.txt 表示打印文件example.txt的最后20行,用C语言实现该程序。(提示:使用命令行参数)
【输入形式】
tail [-n] filename,其中:-n :n表示需要打印的行数,省略时n的值为10。
filename :给定文件名。
【输出形式】
打印文件filename的最后n行
【输入样例】
命令:tail -2 tail.in
tail.in文件内容为:
Alcatel provides end-to-end solutions.
It enables enterprises to deliver content to any type of user.
lcatel operates in 130 countries.
Alcatel focus on optimizing their service offerings and revenue streams.
【输出样例】
屏幕将显示:
lcatel operates in 130 countries.
Alcatel focus on optimizing their service offerings and revenue streams.
【样例说明】
使用tail -2 tail.in输出文件tail.in的最后两行。
【评分标准】
如果你的程序输出正确得20分,每个测试点4分。提交程序名为tail.c。
-Descr iption of the problem 【】
Tail command to print a document in the last n lines.
Command format is: tail [-n] filename, of which:
-n: n, said the number of rows need to print, when n is omitted the value of 10.
filename: the given file name.
For example, the command tail-20 example.txt print documents that example.txt the last 20 lines, using C language realization of the program. (Hint: Use the command-line parameters)
】 【Input form
tail [-n] filename, in which:-n: n, said the number of rows need to print, when n is omitted the value of 10.
filename: the given file name.
】 【Output form
Print document filename of the last n lines
】 【Input sample
Command: tail-2 tail.in
tail.in the content of the document as follows:
Alcatel provides end-to-end solutions.
It enables enterprises to deliver content to any type of user.
lcatel operates in 130 countries.
Alcatel focus on optimizing their service offerings and revenue streams.
【Output sample】
Screen
命令 tail用来打印文件中最后n行。
命令格式为:tail [-n] filename,其中:
-n :n表示需要打印的行数,省略时n的值为10。
filename :给定文件名。
如,命令tail -20 example.txt 表示打印文件example.txt的最后20行,用C语言实现该程序。(提示:使用命令行参数)
【输入形式】
tail [-n] filename,其中:-n :n表示需要打印的行数,省略时n的值为10。
filename :给定文件名。
【输出形式】
打印文件filename的最后n行
【输入样例】
命令:tail -2 tail.in
tail.in文件内容为:
Alcatel provides end-to-end solutions.
It enables enterprises to deliver content to any type of user.
lcatel operates in 130 countries.
Alcatel focus on optimizing their service offerings and revenue streams.
【输出样例】
屏幕将显示:
lcatel operates in 130 countries.
Alcatel focus on optimizing their service offerings and revenue streams.
【样例说明】
使用tail -2 tail.in输出文件tail.in的最后两行。
【评分标准】
如果你的程序输出正确得20分,每个测试点4分。提交程序名为tail.c。
-Descr iption of the problem 【】
Tail command to print a document in the last n lines.
Command format is: tail [-n] filename, of which:
-n: n, said the number of rows need to print, when n is omitted the value of 10.
filename: the given file name.
For example, the command tail-20 example.txt print documents that example.txt the last 20 lines, using C language realization of the program. (Hint: Use the command-line parameters)
】 【Input form
tail [-n] filename, in which:-n: n, said the number of rows need to print, when n is omitted the value of 10.
filename: the given file name.
】 【Output form
Print document filename of the last n lines
】 【Input sample
Command: tail-2 tail.in
tail.in the content of the document as follows:
Alcatel provides end-to-end solutions.
It enables enterprises to deliver content to any type of user.
lcatel operates in 130 countries.
Alcatel focus on optimizing their service offerings and revenue streams.
【Output sample】
Screen
相关搜索: tail
(系统自动生成,下载前可以参看下载内容)
下载文件列表
tail.c
新建文本文档.txt
新建文本文档.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.