Linux命令(4):cat命令

1、作用:连接并显示指定的一个和多个文件的有关信息;

2、格式:cat [选项]  文件1  文件2 ...

  其中文件1、文件2为要显示的多个文件;

3、常见参数

4、使用实例

[youname@www yul]$ cat -n hello1.c hello2.c

  1   #include <stdio.h>

  2   void main()

  3   {

  4     printf("Hello!This is my home! ");

  5   }

  6   #include <stdio.h>

  7   void main()

  8   {

  9     printf("Hello!This is your home! ");

  10   }

在该实例中,指定对 hello1.c 和 hello2.c 进行输出,并指定行号。

原文地址:https://www.cnblogs.com/wangliangliang/p/3956269.html