Linux的cowsay命令怎么用

Linux的cowsay命令怎么用

这篇文章主要介绍了Linux的cowsay命令怎么用的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇Linux的cowsay命令怎么用文章都会有所收获,下面我们一起来看看吧。

使用方法

dnf install cowsay

简单使用:

[root@ansiblecowsay]#cowsayhellowworld!_______________---------------\^__^\(oo)\_______(__)\)\/\||----w|||||[root@ansiblecowsay]#

查询所有能用动物

root@ansible~]#cowsay-lCowfilesin/usr/share/cowsay:beavis.zenblowfishbud-frogsbunnycheesecowerdefaultdragondragon-and-cowelephantelephant-in-snakeeyesflaming-sheepghostbustershead-inhellokittykisskittykoalakoshluke-koalamech-and-cowmeowmilkmoofasamoosemutilatedrensheepskeletonsmallstegosaurusstimpysupermilkersurgerytelebearsthree-eyesturkeyturtletuxuddervadervader-koalawww[root@ansible~]#cd/usr/share/cowsay[root@ansiblecowsay]#ll总用量204-rw-r--r--.1rootroot5846月252016beavis.zen.cow-rw-r--r--.1rootroot6396月252016blowfish.cow-rw-r--r--.1rootroot3106月252016bud-frogs.cow-rw-r--r--.1rootroot1236月252016bunny.cow-rw-r--r--.1rootroot4806月252016cheese.cow-rw-r--r--.1rootroot2306月252016cower.cow-rw-r--r--.1rootroot1756月252016default.cow-rw-r--r--.1rootroot12846月252016dragon-and-cow.cow-rw-r--r--.1rootroot15276月252016DragonAndCow.pm-rw-r--r--.1rootroot10006月252016dragon.cow-rw-r--r--.1rootroot2846月252016elephant.cow-rw-r--r--.1rootroot2956月252016elephant-in-snake.cow-rw-r--r--.1rootroot30386月252016Example.pm-rw-r--r--.1rootroot5856月252016eyes.cow-rw-r--r--.1rootroot4906月252016flaming-sheep.cow-rw-r--r--.1rootroot7126月252016Frogs.pm-rw-r--r--.1rootroot10186月252016ghostbusters.cow-rw-r--r--.1rootroot2576月252016head-in.cow-rw-r--r--.1rootroot1266月252016hellokitty.cow-rw-r--r--.1rootroot6376月252016kiss.cow-rw-r--r--.1rootroot2966月252016kitty.cow-rw-r--r--.1rootroot1626月252016koala.cow-rw-r--r--.1rootroot4066月252016kosh.cow-rw-r--r--.1rootroot2256月252016luke-koala.cow-rw-r--r--.1rootroot9415月2221:38mech-and-cow.cow-rw-r--r--.1rootroot11836月252016MechAndCow.pm-rw-r--r--.1rootroot4736月252016meow.cow-rw-r--r--.1rootroot4396月252016milk.cow-rw-r--r--.1rootroot2426月252016moofasa.cow-rw-r--r--.1rootroot2036月252016moose.cow-rw-r--r--.1rootroot2016月252016mutilated.cow-rw-r--r--.1rootroot2526月252016ren.cow-rw-r--r--.1rootroot2346月252016sheep.cow-rw-r--r--.1rootroot4336月252016skeleton.cow-rw-r--r--.1rootroot1946月252016small.cow-rw-r--r--.1rootroot8546月252016stegosaurus.cow-rw-r--r--.1rootroot11936月252016Stegosaurus.pm-rw-r--r--.1rootroot3646月252016stimpy.cow-rw-r--r--.1rootroot2806月252016supermilker.cow-rw-r--r--.1rootroot8926月252016surgery.cow-rw-r--r--.1rootroot3336月252016telebears.cow-rw-r--r--.1rootroot36246月252016TextBalloon.pm-rw-r--r--.1rootroot2936月252016three-eyes.cow-rw-r--r--.1rootroot13026月252016turkey.cow-rw-r--r--.1rootroot11056月252016turtle.cow-rw-r--r--.1rootroot2156月252016tux.cow-rw-r--r--.1rootroot11346月252016TuxStab.pm-rw-r--r--.1rootroot3926月252016udder.cow-rw-r--r--.1rootroot2796月252016vader.cow-rw-r--r--.1rootroot2136月252016vader-koala.cow-rw-r--r--.1rootroot2486月252016www.cow

指定某个动物:

[root@ansiblecowsay]#cowsay-fkittyhellowworld!_______________---------------\\("`-''-/").___..--''"`-._`*_*)`-.().`-.__.`)(_Y_.)'._)`._`;``-..-'_..`--'_..-_//--'_.',4(il),-''(li),'((!.-'[root@ansiblecowsay]#

安装fortune,csdn积分下载

[root@ansible~]#ll总用量1612-rw-------.1rootroot11877月521:35anaconda-ks.cfg-rw-r--r--.1rootroot11167927月1001:13fortune-mod-1.99.1-17.sdl7.x86_64.rpm-rwxr--r--.1rootroot1137月523:56key.sh-rw-r--r--.1rootroot5228207月1001:19librecode-3.6-alt11.1.1.x86_64.rpm[root@ansible~]#rpm-ivhlibrecode-3.6-alt11.1.1.x86_64.rpmVerifying...#################################[100%]准备中...#################################[100%]正在升级/安装...1:librecode-3.6-alt11.1.1#################################[100%][root@ansible~]#rpm-ivhfortune-mod-1.99.1-17.sdl7.x86_64.rpm警告:fortune-mod-1.99.1-17.sdl7.x86_64.rpm:头V3RSA/SHA256Signature,密钥ID41a40948:NOKEYVerifying...#################################[100%]准备中...#################################[100%]正在升级/安装...1:fortune-mod-1.99.1-17.sdl7#################################[100%][root@ansible~]#fortune|cowsay-fkiss_________________________________________/LettheworthycitizensofChicagoget\|theirliquorthebestwaytheycan.I'm||sickofthejob.It'sathanklessone||andfullofgrief.|||\--AlCapone/-----------------------------------------\\,;;;;;;;,;;;;;;;;;;;,;;;;;'_____;';;;(/))))|((\_;;((((((|))))/|_\\\\\\\\\\\\.--~(\~))))))))))))/\`\-(((((((((((\\||`\)|\/|)||`._/\_____/||,`\~/|\\/|`.`\|/|~-`\/\____~._/~-_,(\|-----|\\';;||:;;;'\|/|||||[root@ansible~]#

写了一个简单shell

[root@ansible~]#catcowsay.sh#!bin/bash#callcowsayafterloginanimal=$(ls/usr/share/cowsay|shuf-n1)str=${animal%.*}#passsentencetocowsaywithrandomanimalfortune|cowsay-f$str[root@ansible~]#shcowsay.sh_______________________________________/Themostimportantdesignissue...is\|thefactthatLinuxissupposedtobe||fun...||||--LinusTorvaldsattheFirstDutch|\InternationalSymposiumonLinux/---------------------------------------\\\_\__/_/\\__/(oo)\_______(__)\)\/\||----w|||||[root@ansible~]#shcowsay.sh_______________________________________/Doyourottersdotheshimmy?Dothey\|liketoshaketheirtails?Doyour||wombatssleepintophats?Isyour|\gardenfullofsnails?/---------------------------------------\\______________/\_/||||||||###\/###|||0\/0||/|||/|#

把sh放到/etc/profile.d

关于“Linux的cowsay命令怎么用”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“Linux的cowsay命令怎么用”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注恰卡编程网行业资讯频道。

发布于 2022-02-16 23:33:43
收藏
分享
海报
0 条评论
56
上一篇:Linux怎么进行压力测试 下一篇:Linux中怎么查看SSH的版本
目录

    0 条评论

    本站已关闭游客评论,请登录或者注册后再评论吧~

    忘记密码?

    图形验证码