linux shell wc 命令
1. 语法与选项
| Short Option | Long Option | Option Description |
|---|---|---|
| -c | –bytes | print the byte counts |
| -m | –chars | print the character counts |
| -l | –lines | print the newline counts |
| –files0-from=F | read input from the files specified by NUL-terminated names in file F | |
| -L | –max-line-length | print the length of the longest line |
| -w | –words | print the word counts |
2. 实例
打印文件的行数,单词数,字符串数
$wc file
结果:
X Y Z file
#X 行数
#Y 单词数
#Z 字符数
单独打印行数
$ wc -l file
linux shell wc 命令的更多相关文章
- Linux shell tr 命令详解
该随笔摘自 https://www.jb51.net/article/103892.htm Linux shell tr 命令详解 1. 用途 tr,translate的简写,主要用于压缩重复字符,删 ...
- linux中wc命令
目录 一:linux中wc命令 1.wc命令介绍 2.wc命令作用 3.wc命令格式 4.参数 5.解析案例 一:linux中wc命令 1.wc命令介绍 Linux wc命令用于计算字数. 利用wc指 ...
- linux shell 管道命令(pipe)使用及与shell重定向区别
管道命令操作符是:”|”,它仅能处理经由前面一个指令传出的正确输出信息,也就是 standard output 的信息,对于 stdandarderror 信息没有直接处理能力.然后,传递给下一个命令 ...
- linux之wc命令详解
Linux系统中wc(Word Count)命令的功能为统计指定文件中的字节数.字数.行数,并将统计结果显示输出. 1.命令格式 wc [options] 文件... 2.命令功能 统计指定文件中的字 ...
- python文件读写操作与linux shell变量命令交互执行
python对文件的读写还是挺方便的,与linux shell的交互变量需要转换一下才能用,这比较头疼! #coding=utf-8 #!/usr/bin/python import os impor ...
- Linux shell日常命令和技巧
转自:http://www.vaikan.com/linux-shell-tips-and-tricks/ 原文:http://www.techbar.me/linux-shell-tips/ 使用L ...
- Linux Shell : Test命令参数解析
格式: test conditions test -n string : string 不为空 test -z string : string 为空 test int1 -eq int2 : int ...
- Linux shell 及命令汇总
1 文件管理命令 1.cat命令:将文件内容连接后传送到标准输出或重定向到文件 2.chmod命令:更改文件的访问权限 3.chown命令:更改文件的所有者 4.find命令:查找(符合条件)文件并将 ...
- Linux Shell nohup命令用法
linux的nohup命令的用法. 在应用Unix/Linux时,我们一般想让某个程序在后台运行,于是我们将常会用 & 在程序结尾来让程序自动运行.比如我们要运行mysql在后台: /us ...
随机推荐
- structDemo1
structDemo1 # include <iostream.h> # include <malloc.h> enum EType{ One = ,Tow,Three }; ...
- iOS各种系统通知Name
当了一次搬运工,原地址:http://blog.csdn.net/db905517804/article/details/50569949 用法: - (void) viewWillAppear:(B ...
- Eclipse下设置github开发环境
1.按照github上的指南配置(http://help.github.com/win-set-up-git/)基础的git环境. 2.在github上创建一个Repository. 3.在Eclip ...
- POJ_2446_Chessboard
题目意思就是一个M*N的有洞棋盘棋盘上,用1*2的板子去覆盖没有洞的地方,要求板子不能重叠,最终能否将棋盘完整覆盖. 代码: #include<stdio.h> #include<s ...
- 一个简单的DDraw应用程序2
//------------------------------------------------------------------------- // 文件名 : 6_1.cpp// 创建者 : ...
- ANDROID_MARS学习笔记_S02重置版_001_Hander\Looper\Message\Thread\ThreadLocal
一. * class LooperThread extends Thread { * public Handler mHandler; * * public void run() { * Looper ...
- LiBsvm用于多分类时训练模型参数含义
The 'svmtrain' function returns a model which can be used for futureprediction. It is a structure a ...
- BZOJ_1208_&_Codevs_1258_[HNOI2004]_宠物收养所_(平衡树/set)
描述 http://www.lydsy.com/JudgeOnline/problem.php?id=1208 (据说codevs要更新?就不放codevs的地址了吧...) 有宠物和人,每个单位都有 ...
- 计数方法,博弈论(扫描线,树形SG):HDU 5299 Circles Game
There are n circles on a infinitely large table.With every two circle, either one contains another o ...
- MFC DialogBar 按钮灰色不响应
在MFC单文档加添加DialogBar,然后在DialogBar上添加按钮,会出现如下情况,单击无响应. 解决方案: 在 CSideDialogBar头文件和CPP文件里添加如下函数 afx_msg ...