LoginSignup
0
1

More than 5 years have passed since last update.

bash > 10秒おきにランダムにdata/*.mdのtitleを表示する

Last updated at Posted at 2017-09-21
動作環境
Ubuntu 14.04 LTS

参考

ファイルの行をsort -Rでランダムに並び替える

試した

shuffle_bash_170921_exec
#!/usr/bin/env bash
ls data/*.md | sort -R | head -n 1 | xargs grep title

データを取得。

$ git clone https://github.com/yasokada/TechEnglish_170903.git

dataディレクトリが見える場所に移動。

$ cd TechEnglish_170903

10秒おきに表示する。

$ watch -n 10 bash shuffle_bash_170921_exec 

以下のような表示が10秒おきに切り替わる。

run
Every 10.0s: bash shuffle_bash_170921_exec              Wed Sep 20 20:49:20 2017

title: "before making OSSD output connections and [interfacing the EZ-SCREEN LS
to the machine]"

技術英語の復習として、とりあえずランダムには表示できる。

TODO

  • Recently updated
  • Touch Barに表示
    • Touch Bar付きMacbook Proは持っていない
  • PowerShell? for Windows
0
1
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
0
1