find . -type f|xargs シェル関数 みたいなことをしたいときにはexport -f シェル関数しておけば良い。bashなら、
$ test_func() { echo $1; }
$ export -f test_func
$ echo aaa | xargs -I{} bash -c "test_func {}"
aaa
という感じで、シェル関数をexportできる。
Challange IT For Future
find . -type f|xargs シェル関数 みたいなことをしたいときにはexport -f シェル関数しておけば良い。bashなら、
$ test_func() { echo $1; }
$ export -f test_func
$ echo aaa | xargs -I{} bash -c "test_func {}"
aaa
という感じで、シェル関数をexportできる。
Fessの開発状況とかを簡単にここで共有しておこう。
現在は
・12.4.xブランチ:Elasticsearch 6.5に対応
・12.5.xブランチ:Elasticsearch 6.6に対応
・masterブランチ:Elasticsearch 7.0に対応
という感じで進めている。商用でメインで使っているものはまだ12.4.xなので、近いうちに12.5.xに切り替えたら、12.4.xブランチには修正を入れない感じになると思う。
Elasticsearch的には6.7もリリースされそうなので、それに対応する12.6.xブランチを作って、Fess 12.6もリリースすることになるだろうなぁ、とは考えています。
masterブランチについては、Elasticsearch 7.0 beta1が出たので、これから7系の対応をしていくことになると思います。これはFess 13になると思いますが、Elasticsearchとの通信がHTTPだけになるので(Transportは使わない)結構、内部的には変わる感じになると思います。とはいえ、今までもそうでしたが、見た目とかはほぼ変わらない気はします。
という感じで進めていますが、SAML対応とかも入れたいところではありますが、Elasticsearch 7がそこそこ変わっているので、まずはそこの対応をしてからその他の機能追加は考えていく感じになると思います。
昔は結構書いていたけど、最近、ブログは書かなくなってしまい、数年前に書こうと思いつつ、時間が経ってしまっている。そんな感じで書かないで時間が過ぎ去ってしまっているが、WordPressベースでここも整理したりしたので、また書いていけるようにしたいと思う今日この頃…。
git branch -aとかで見ても、HEADが指定されていないときには以下をすれば設定できる。origin/masterをHEADにするときの例。
$ git remote set-head origin master
役に立たなそうな隠しコマンド的なやつたち。
>>> import __hello__
Hello world!
>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
>>> import antigravity
>>> from __future__ import braces
File "<stdin>", line 1
SyntaxError: not a chance