20
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

LINE Notify 簡単なシェルスクリプトで試してみた

Posted at

LINE Notify 簡単なシェルスクリプトで試してみた

Summary

LINE Engineers' Blog コマンドラインから LINE にメッセージを送れる LINE Notifyを参考にトークンとメッセージを引数で渡す簡単なシェルスクリプトで試してみました。

LINE Notifyはシンプルなので、色々と使えそうです。

Usage

sh ./line_notify.sh ACCESS_TOKEN "foobar"

Shell Script

line_notify.sh
#!/bin/sh

ACCESS_TOKEN=$1
MSG=$2

curl -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -F "message=$MSG" https://notify-api.line.me/api/notify
20
13
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
20
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?