Add tags

Add tags to the following comment

pure bash。引数。2進数のみ。

bashのprintfだと%bが使えないようなので、8進数経由で。

1
2
3
4
5
6
a=(000 001 010 011 0100 0101 110 111)
n=`printf '%o\n' $1`
while [ "$n" != '' ];do
  echo -n ${a[${n:0:1}]}
  n=${n:1}
done

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...