AppleScript → Shell → Python で、trimする。 log my trim({text_:" test "}) on trim(args) set {text_:aText}
カテゴリー: Shell
【Shell】sort コマンド
フォルダ一覧を取得する際に、 sort を付けなかったら、並びがバラバラだったので、 並び替えのコマンドを追加。 set file_path to "【フォルダパス】" set list_str to
【Python】Shell、Apple Script に引数を渡して戻り値を取得する方法
Python から Shell 経由で Apple Script のコードを使う。 Pythonファイル(test.py) import subprocess if __name__ == '__main__&
【Shell】Python に引数を渡して戻り値を取得する方法
Python に引数を渡して戻り値を取得する Shell コマンド test1=$(python test.py 123) echo $test1 test.py import sys arg1 = "&quo
【Shell】Macの画面に通知ダイアログを出す方法
AppleScript 経由で Shellからでも通知ダイアログを出せる。 #!/bin/sh /usr/bin/osascript -e 'display notification "hogehog
【Shell】ファイルをゴミ箱へ移動する方法
ファイルを削除するときに、 rm コマンドを使うと間違って消してしまった時に復活できないのが困った。 なので、 いったんゴミ箱へ移動させることに。 ゴミ箱は、 ~/.Trash でディレクトリ指定できる。 trash.s