系统相关
首页 > 系统相关> > 玩linux 02 毒鸡汤

玩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

标签:02,epel,鸡汤,mirrors,repos,repo,num,yum,linux
来源: https://blog.csdn.net/qq_36007881/article/details/116094692