bash

How to post a task to a Chatwork room using api

Preparation What you needs are ChatWork API Token Account ID Room ID First of all, ChatWorkToken. You can get it from link below: ChatWork After you get your token, follow this page. 認証方法 - チャットワークAPIドキュメント Next, Account D…

How to send an email via gmail api using bash

If you want to simply send an email from your servers, I think that the easiest way is using Gmail API. Not only unnecessary to launch mail server like postfix but also verify Email Address like in AWS. #!/bin/bash user="hoge@gmail.com" pa…

How to pipe only stderr in cron, and handle it as an arguement

01 8 * * * (bash hoge.sh >> /var/log/app/result.log) |& tee -a /var/log/app/result.log | fuga.sh "$(cat -)" Bash Reference Manual Bash Reference Manual tee(1) - Linux manual page fuga.sh can receive the value of "$(cat -)" as "$1".