Linux查看、统计类命令使用,shell基础(&>/dev/null、read、expr)

shell


head,tail

head——默认显示前十行信息

head -n——显示前n行信息

tail——默认显示后十行信息

tail -n——显示后十行信息

取出/etc/inittab文件的第六行

在这里插入图片描述

sort、cut

取出当前系统上所有用户的shell

每种shell只显示一次,按顺序进行显示
在这里插入图片描述
cut——文本切割显示

cut -d——指定分隔符

cut -f——指定第几列被切割

sort——文本排序

sort -n——按照数值大小排序

sort -r——逆序排序

sort -u——去重

sort -t——设定间隔符

sort -k——指定列数

wc、cut

如果/var/log/messages文件行数大于100,

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<builders> <org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder plugin="conditional-buildstep@1.4.2"> <condition class="org.jenkins_ci.plugins.run_condition.contributed.ShellCondition" plugin="run-condition@1.5"> <command>if git show --summary HEAD | grep -q -E "\(cherry picked from commit \b[0-9a-f]{5,40}\b\)"; then exit 1 fi</command> </condition> <buildStep class="hudson.tasks.Shell"> <command>./scripts/checkpatch.pl --min-conf-desc-length=1 --ignore GERRIT_CHANGE_ID -g HEAD </command> <configuredLocalRules/> </buildStep> <runner class="org.jenkins_ci.plugins.run_condition.BuildStepRunner$Run" plugin="run-condition@1.5"/> </org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder> <hudson.tasks.Shell> <command>NCPU=$(expr $(nproc --all ) / 2) make O=build-${BUILD_ID} -s defconfig make O=build-${BUILD_ID} -j$NCPU -s Image make O=build-${BUILD_ID} -j$NCPU -s modules make O=build-${BUILD_ID} INSTALL_MOD_PATH=../install-${BUILD_ID} -s modules_install mkdir -p install-${BUILD_ID}/boot/ KERNELVER=$(cat build-${BUILD_ID}/include/config/kernel.release 2> /dev/null) cat build-${BUILD_ID}/arch/arm64/boot/Image > install-${BUILD_ID}/boot/Image-$KERNELVER cp build-${BUILD_ID}/System.map install-${BUILD_ID}/boot/System.map-$KERNELVER cp build-${BUILD_ID}/.config install-${BUILD_ID}/boot/config-$KERNELVER tar -cJf install-${BUILD_ID}/linux-$KERNELVER.tar.xz -C install-${BUILD_ID}/ boot lib</command> <configuredLocalRules/> </hudson.tasks.Shell> <hudson.tasks.Shell> <command>cd $HOME/src/linux git fetch -p -t git pull </command> <configuredLocalRules/> </hudson.tasks.Shell> </builders> 这是一段Jenkins job的定义,请把它转成对应的JJB的yaml格式配置文件
07-15

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值