当前位置:网站首页>0716RHCSA
0716RHCSA
2022-07-25 12:59:00 【Psc_February2】
一、文件内容浏览
1)cat查看/etc/passwd文件内容,且输出时带行号:
2)使用more/less查看/etc/passwd内容,且每页显示10行:
3)使用head/tail分别查看文件前5行内容和后5行内容:
4)使用grep查看/etc/passwd中和root相关的内容:
二、cut命令:
给定文件cut_data.txt且内容为:
No Name Score
1 zhang 20
2 li 80
3 wang 90
4 sun 60
按指定分界符去切割时的文本:
No|Name|Score
1|zhang|20
2|li|80
3|wang|90
4|sun|60- 使用默认定界符切割文件内容,且输出切割后的第一个字段
- 切割文件内容,且输出切割后的第一个字段和第三个字段
- 按字节切割:输出切割的第一个字节到第10个字节的内容
- 按字符切割:输出切割后的第一个字符和第5个字符的内容
- 按指定分界符去切割, 输出第一个字段和第三个字段内容




三、uniq命令:
新建文件uniq_data.txt,文件内容为
Welcome to Linux
Windows
Windows
Mac
Mac
Linux使用uniq命令输出去重后的结果 
使用uniq命令只输出重复的行 
使用uniq命令输出不重复的行
使uniq命令统计重复次数
四、sort命令:
新建文件 num.txt, args.txt
文件内容:num.txt
(有两个空格)1
3
5
2
4
文件内容:args.txt
test
args1
args2
args4
args4
args3
给定文件info_txt:按第二列作为key进行排序
No Name Score
1 zhang 20
2 li 80
3 wang 90
4 sun 60
对num.txt进行排序,且将结果输出到sorted_num.txt中
对args.txt进行排序,且将结果输出到sorted_args.txt中
对num.txt和args.txt进行排序,且将结果输出到sorted_merge.txt中 
对args.txt排序后去重输出
合并sorted_args.txt和sorted_num.txt且输出
给定文件info_txt:按第二列作为key进行排序
五、tr命令:
将26个小写字母的后13个字母替换成大写字母

将hello 123 world 456中的数字替换成空字符(提示使用通配符)

将hello 123 world 456中字母和空格替换掉,只保留数字(提示使用通配符)

边栏推荐
- 微软提出CodeT:代码生成新SOTA,20个点的性能提升
- The larger the convolution kernel, the stronger the performance? An interpretation of replknet model
- 【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享
- Clickhouse notes 03-- grafana accesses Clickhouse
- TCP的拥塞控制
- R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题
- 若依如何实现用户免密登录配置方法?
- AtCoder Beginner Contest 261E // 按位思考 + dp
- 需求规格说明书模板
- 【历史上的今天】7 月 25 日:IBM 获得了第一项专利;Verizon 收购雅虎;亚马逊发布 Fire Phone
猜你喜欢

R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题
![[ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)](/img/05/86eed30a7c063beace400a005e4a4c.png)
[ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)

【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享

Date and time function of MySQL function summary

Moving Chinese figure liushenglan

Chapter5 : Deep Learning and Computational Chemistry
![Detailed explanation of the training and prediction process of deep learning [taking lenet model and cifar10 data set as examples]](/img/70/2b5130be16d7699ef7db58d9065253.png)
Detailed explanation of the training and prediction process of deep learning [taking lenet model and cifar10 data set as examples]

massCode 一款优秀的开源代码片段管理器

Make a general cascade dictionary selection control based on jeecg -dictcascadeuniversal

基于JEECG制作一个通用的级联字典选择控件-DictCascadeUniversal
随机推荐
AtCoder Beginner Contest 261 F // 树状数组
Substance designer 2021 software installation package download and installation tutorial
【GCN】《Adaptive Propagation Graph Convolutional Network》(TNNLS 2020)
机器学习强基计划0-4:通俗理解奥卡姆剃刀与没有免费午餐定理
G027-OP-INS-RHEL-04 RedHat OpenStack 创建自定义的QCOW2格式镜像
【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享
深度学习的训练、预测过程详解【以LeNet模型和CIFAR10数据集为例】
需求规格说明书模板
如何用因果推断和实验驱动用户增长? | 7月28日TF67
Mid 2022 review | latest progress of large model technology Lanzhou Technology
The larger the convolution kernel, the stronger the performance? An interpretation of replknet model
Introduction to web security UDP testing and defense
ECCV 2022 | 登顶SemanticKITTI!基于二维先验辅助的激光雷达点云语义分割
Shell常用脚本:获取网卡IP地址
R language GLM generalized linear model: logistic regression, Poisson regression fitting mouse clinical trial data (dose and response) examples and self-test questions
ORAN专题系列-21:主要的玩家(设备商)以及他们各自的态度、擅长领域
Shell common script: check whether a domain name and IP address are connected
A turbulent life
7行代码让B站崩溃3小时,竟因“一个诡计多端的0”
工业互联网的内涵及其应用