玩linux 02 毒鸡汤

2021/4/25 7:28:34

本文主要是介绍玩linux 02 毒鸡汤,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

01.修改yum源
优化基础源:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
优化扩展源:
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
安装 rpm -qa sl
安装 rpm -ql cowsay
02.毒鸡汤文档,来一套
03.vi nisay

#!/bin/bash

if [ $# -lt 1 ] || [ $# -gt 1 ];then
	echo "wrong args"
	exit;
fi

num=$(awk 'END{print NR}' $1)
value=$[$RANDOM%$num+1]
cat  $1 |head -n $value |tail -n 1 | animalsay


这篇关于玩linux 02 毒鸡汤的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程