generated at
Scrapbox:ページ上のスクリプトを実行する
標準入力をスクリプトとして実行できる スクリプト言語を実行する
スクリプトの実行はローカル環境で行われる
元記事では Ruby だけれど、 Python でもできた

hello.py
print('Hello World はろーワールド')

実行コマンドライン
$ curl -s https://scrapbox.io/api/code/suto3/Scrapbox:%E3%83%9A%E3%83%BC%E3%82%B8%E4%B8%8A%E3%81%AE%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B/hello.py | python


hello.sh
#!/bin/bash echo 'Hello Scrapbox World'
実行コマンドライン
$ curl -s https://scrapbox.io/api/code/suto3/Scrapbox:%E3%83%9A%E3%83%BC%E3%82%B8%E4%B8%8A%E3%81%AE%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B/hello.sh | bash
おお、シェルスクリプトもいける
(あ、これじゃ標準入力を使うタイプのスクリプトは動かないのか)
コンパイルもできる

Scrapbox-tips