Skip to the content. Bash-Oneliner I am glad that you are here! I was working on bioinformatics a few years ago and was amazed by those single-word bash commands which are much faster than my dull scripts, time saved through learning command-line shortcuts and scripting. Recent years I am working on cloud computing and I keep recording those useful commands here. Not all of them is oneliner, but i
#!/bin/sh urlencode() { # https://qiita.com/ik-fib/items/cc983ca34600c2d633d5 echo "$1" | nkf -WwMQ | sed 's/=$//g' | tr = % | tr -d '\n' } HOST="jp-east-1.computing.api.nifcloud.com" ACCESS_KEY="<YOUR ACCESS KEY>" SECRET_KEY="<YOUR SECRET KEY>" TIMESTAMP="`date -u +'%FT%T.%2NZ' | sed -e 's/:/%3A/g'`" declare -A params=( ["Action"]="DescribeVolumes" ["VolumeId.1"]="VolumeId" ["SignatureMethod"]="H
I have some script that produces output with colors and I need to remove the ANSI codes. #!/bin/bash exec > >(tee log) # redirect the output to a file but keep it on stdout exec 2>&1 ./somescript The output is (in log file): java (pid 12321) is running...@[60G[@[0;32m OK @[0;39m] I didn't know how to put the ESC character here, so I put @ in its place. I changed the script into: #!/bin/bash exec >
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く