5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

顔文字をランダムで出力するスクリプト

Posted at

顔文字リストを作成します

kaomoji.md
(▰˘◡˘▰)
(゚Д゚)ハッ!
(≧ڡ≦*)
ヾ(。>﹏<。)ノ゙
(◞‿◟)
( ◞・౪・)◞
(  ◜◡◝  ) 
(º﹃º)
٩꒰๑・д・꒱۶
(*0_0)ノシ
(๑•₃•๑)
(๑•́ ₃ •̀๑)
( ◜◡‾)(‾◡◝ )
(๑′ᴗ‵๑)
꒰•̥̥ ﹏ •̥̥๑꒱
(╹〰╹)
(´・3・`)
(੭ु˙꒳<200b>˙)੭ु⁾⁾
。゚(゚∩´﹏`∩゚)゚。
(´◉_◉`)
(*˘︶˘*)
ヾノ。ÒㅅÓ)ノシ
⁽˙³˙⁾◟( ˘•   ̫ •˘ )◞⁽˙³˙⁾)
(◜◡‾c彡☆)◡◝))

ランダムで顔文字を出力するスクリプトを作成します。

kaomoji_rand.sh
# !/bin/bash

TEXT='/Users/soramugi/Documents/kaomoji/kaomoji.md'
WCNUM=`cat $TEXT | wc -l`
RUNNUM=$(( (RANDOM % $WCNUM ) + 1 ))

cat $TEXT | awk "NR==$RUNNUM"

完成です。

なまえ@soramugi-Air ~ $ source kaomoji_rand.sh
(๑′ᴗ‵๑)

エイリアスを貼ってツイート出来るようにしておけば幸せ

.bashrc
alias tweet='ruby ~/command_tweet.rb'
alias tweetkao='tweet `source ~/kaomoji_rand.sh`'
5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?