Linux

asciiview

自从有了你,黑与白的世界也可以五彩缤纷
安装指令如下:

  1. sudo apt-get install aview imagemagick
  2. asciiview kobe.jpg

执行结果如下;(致敬蜗壳)
Linux耍酷命令 - 图1
PS:可更换妹子的照片,ohoho

oneko

我的系统里养了一只小猫,它的名字叫 “爱你”
你就是鼠标,我便是“爱你”,一直追着鼠标跑
安装指令如下;

  1. sudo apt-get install ninvaders

执行结果如下;
Linux耍酷命令 - 图2

cmatrix

今天没见你,我的系统为你下起了 “大雨”
安装指令如下;

  1. sudo apt-get install cmatrix

执行结果如下;
Linux耍酷命令 - 图3
图片

pipe

手撸 pipe
做我女朋友,我将为你筑起无数爱的城墙
脚本如下所示;

  1. #!/bin/bash
  2. # The author of the original script is unknown to me. The first entry I can
  3. # find was posted at 2010-03-21 09:50:09 on Arch Linux Forums (doesn't mean the
  4. # poster is the author at all):
  5. #
  6. # Post your handy self made command line utilities (Page 37) / Programming & Scripting / Arch Linux Forums
  7. #
  8. # I, Yu-Jie Lin, made a few changes and additions:
  9. #
  10. # -p, -t, -R, and -C
  11. #
  12. # Screenshot: http://flic.kr/p/dRnLVj
  13. # Screencast: http://youtu.be/5XnGSFg_gTk
  14. #
  15. # And push the commits to Gist:
  16. #
  17. # https://gist.github.com/4689307
  18. #
  19. # I, Devin Samarin, made a few changes and additions:
  20. #
  21. # -r can be 0 to mean "no limit".
  22. # Reset cursor visibility after done.
  23. # Cleanup for those people who want to quit with ^C
  24. #
  25. # Pushed the changes to https://gist.github.com/4725048
  26. # hole1: https://gist.githubusercontent.com/livibetter/4689307/raw/949e43fe2962c2c97c8b1d974ff93dd053d9bd37/pipes.sh
  27. # hole2: Fun On The Terminal Part 2
  28. p=1
  29. f=75 s=13 r=2000 t=0
  30. w=$(tput cols) h=$(tput lines)
  31. # ab -> idx = a*4 + b
  32. # 0: up, 1: right, 2: down, 3: left
  33. # 00 means going up , then going up -> ┃
  34. # 12 means going right, then going down -> ┓
  35. sets=(
  36. "┃┏ ┓┛━┓ ┗┃┛┗ ┏━"
  37. "│╭ ╮╯─╮ ╰│╯╰ ╭─"
  38. "│┌ ┐┘─┐ └│┘└ ┌─"
  39. "║╔ ╗╝═╗ ╚║╝╚ ╔═"
  40. )
  41. v="${sets[0]}"
  42. RNDSTART=0
  43. NOCOLOR=0
  44. OPTIND=1
  45. while getopts "p:t:f:s:r:RCh" arg; do
  46. case $arg in
  47. p) ((p=(OPTARG>0)?OPTARG:p));;
  48. t) ((OPTARG>=0 && OPTARG<${#sets[@]})) && v="${sets[OPTARG]}";;
  49. f) ((f=(OPTARG>19 && OPTARG<101)?OPTARG:f));;
  50. s) ((s=(OPTARG>4 && OPTARG<16 )?OPTARG:s));;
  51. r) ((r=(OPTARG>=0)?OPTARG:r));;
  52. R) RNDSTART=1;;
  53. C) NOCOLOR=1;;
  54. h) echo -e "Usage: $(basename $0) [OPTION]..."
  55. echo -e "Animated pipes terminal screensaver.\n"
  56. echo -e " -p [1-]\tnumber of pipes (D=1)."
  57. echo -e " -t [0-$((${#sets[@]} - 1))]\ttype of pipes (D=0)."
  58. echo -e " -f [20-100]\tframerate (D=75)."
  59. echo -e " -s [5-15]\tprobability of a straight fitting (D=13)."
  60. echo -e " -r LIMIT\treset after x characters, 0 if no limit (D=2000)."
  61. echo -e " -R \t\trandom starting point."
  62. echo -e " -C \t\tno color."
  63. echo -e " -h\t\thelp (this screen).\n"
  64. exit 0;;
  65. esac
  66. done
  67. cleanup() {
  68. tput rmcup
  69. tput cnorm
  70. exit 0
  71. }
  72. trap cleanup SIGHUP SIGINT SIGTERM
  73. for (( i=1; i<=p; i++ )); do
  74. c[i]=$((i%8)) n[i]=0 l[i]=0
  75. ((x[i]=RNDSTART==1?RANDOM*w/32768:w/2))
  76. ((y[i]=RNDSTART==1?RANDOM*h/32768:h/2))
  77. done
  78. tput smcup
  79. tput reset
  80. tput civis
  81. while ! read -t0.0$((1000/f)) -n1; do
  82. for (( i=1; i<=p; i++ )); do
  83. # New position:
  84. ((${l[i]}%2)) && ((x[i]+=-${l[i]}+2,1)) || ((y[i]+=${l[i]}-1))
  85. # Loop on edges (change color on loop):
  86. ((${x[i]}>w||${x[i]}<0||${y[i]}>h||${y[i]}<0)) && ((c[i]=RANDOM%8))
  87. ((x[i]=(x[i]+w)%w))
  88. ((y[i]=(y[i]+h)%h))
  89. # New random direction:
  90. ((n[i]=RANDOM%s-1))
  91. ((n[i]=(${n[i]}>1||${n[i]}==0)?${l[i]}:${l[i]}+${n[i]}))
  92. ((n[i]=(${n[i]}<0)?3:${n[i]}%4))
  93. # Print:
  94. tput cup ${y[i]} ${x[i]}
  95. [[ $NOCOLOR == 0 ]] && echo -ne "\033[1;3${c[i]}m"
  96. echo -n "${v:l[i]*4+n[i]:1}"
  97. l[i]=${n[i]}
  98. done
  99. ((r>0 && t*p>=r)) && tput reset && tput civis && t=0 || ((t++))
  100. done
  101. cleanup

执行结果如下;
Linux耍酷命令 - 图4

sl

我的“火车”,拉满爱意,只为奔你而来

  1. sudo apt-get install sl

执行结果如下:
Linux耍酷命令 - 图5

ninvaders

带妹子展示,最“远古版”太空侵略者
安装指令如下;

  1. sudo apt-get install ninvaders

执行结果如下;
Linux耍酷命令 - 图6