Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
写了个简单的硬件信息输出脚本,带Deepin的LOGO
Theme area
2017
views ·
3
replies ·
To
floor
Go
Bluek404
deepin
2015-01-20 07:50
Author
DeepinScreenshot20150120001218.png
没什么技术含量,logo是用Ascii Generator生成的
因为硬件信息过长什么的有可能会折行
暂时没找到更好的输出方式
然后多块CPU和显卡什么的只会显示其中一个
欢迎改进哈
#!bin/sh
version=$(cat /etc/lsb-release | grep 'DISTRIB_DESCRIPTION' | cut -d '"' -f 2)
cpu=$(cat /proc/cpuinfo | grep 'model name' | cut -d : -f 2 | sed -n 1p)
cpuNum=$(cat /proc/cpuinfo | grep 'model name' | cut -d : -f 2 | wc -l)
mem=$(cat /proc/meminfo | grep 'MemTotal' | cut -d : -f 2 | tr -d " kB")
memGB=$(echo "scale=1;$mem/1000000" | bc)
vga=$(lspci | grep 'VGA compatible controller' | cut -d : -f 3)
hostBridge=$(lspci | grep 'Motherboard' | cut -d : -f 3)
eth=$(lspci | grep 'Ethernet controller' | cut -d : -f 3)
echo "
\033[1;34m .7Z3ZAGEN888NNEG9E.
\033[1;34m 35Z4sII33 73Z5s:
\033[1;34m rP54sIICC29 r5343Z5PE;
\033[1;34m ,B954VIICCI2A. .EGPaaP0GENmRR8 \033[2;32m系统:
\033[1;34m c#Ga4sIIIIIV5r G#mNEEL BB4 \033[1;37m$version
\033[1;34m AB;;E54VVVV2ZG; VB# ;B7 \033[2;32mCPU:
\033[1;34m 2@, rG544443AL. rBr PE rlr, r@r \033[1;37m$cpu * $cpuNum
\033[1;34m Lg; ,V053335Gr ;gL 3m8 ;#r:B L@; \033[2;32m内存:
\033[1;34m rgr r8GA55ANr ,g4 ,aRs r@r 2@V 4@, \033[1;37m$memGB GB
\033[1;34m rgr IR89APNr EL 1RB@ r@r BB2 TB1r \033[2;32m显卡:
\033[1;34m,5N; rRREGNB; ,@B@@g, :#gr BR#r Am8 \033[1;37m$vga
\033[1;34m,Za, g@RRR@, ;ggr ,ggv B#BL 9RR \033[2;32m网卡:
\033[1;34m.VBr ;gg@@gr Cgg4 B#BL .Egg \033[1;37m$eth
\033[1;34m rgr 4gggggggggB; RRR@L 4g,
\033[1;34m rgB; 4gBRB9: 4g,
\033[1;34m Lgr ;gggBB@g4 Lg;
\033[1;34m 4ggggRr ;Egggg@@B@gB; rgr
\033[1;34m rBgggggggggggggggggggg@@@@@ggg ,ggL
\033[1;34m ggggggggggggggggg@@B@ggggg; sg0
\033[1;34m ;ggggg@@@@@@@@@@gggggg4 4gg
\033[1;34m :Gggggggg@@@@ggggg ;ggg;
\033[1;34m gggggggg@V 4ggg0
\033[1;34m ,Nggggggggggggr
"
Copy the Code
Reply
Like 0
Favorite
View the author
All Replies
iceyer
deepin
2015-01-20 18:05
#1
第一行应该是:
#!/bin/sh
Reply
Like 0
View the author
electricface
deepin
2015-01-20 18:07
#2
大赞楼主啊
Reply
Like 0
View the author
Bluek404
deepin
2015-01-20 23:51
#3
第一行应该是:
#!/bin/sh
bash写习惯了 :mrgreen:
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
The settings menu needs to be translated into Russian.
the Network section no longer appears
Error during system installation
Deepin IDE?
Deepin Native Apps not launching in the latest version
Music player with sample rate and bit depth
Popular Events
More
没什么技术含量,logo是用Ascii Generator生成的
因为硬件信息过长什么的有可能会折行
暂时没找到更好的输出方式
然后多块CPU和显卡什么的只会显示其中一个
欢迎改进哈