コンテンツへスキップ
Dev-Dev

Dev-Dev

開発覚書

おうち性教育はじめます自宅学習の強化書子育てベスト100こどもSDGs無理ゲー社会
  • HOME
  • にゃんこ大戦争
  • Privacy Policy

カテゴリー: Shell

【Apple Script】Shellのパスが違う

2020年3月5日 dev Apple Script, Shell
【Apple Script】Shellのパスが違う

Apple Script から ライブラリをインポートした pyファイルを実行したら、「そんなライブラリはありません」とエラーが出た。 パスが通ってないからだろうなと思い、 ターミナルから、 export -p と打つと

Continue reading

【AppleScript】Python を使って「trim」する

2020年3月2日 dev Apple Script, Python, Shell
【Apple Script】Shellのパスが違う

AppleScript → Shell → Python で、trimする。 log my trim({text_:" test "}) on trim(args) set {text_:aText}

Continue reading

【Shell】sort コマンド

2020年2月28日 dev Shell
【Apple Script】Shellのパスが違う

フォルダ一覧を取得する際に、 sort を付けなかったら、並びがバラバラだったので、 並び替えのコマンドを追加。 set file_path to "【フォルダパス】" set list_str to

Continue reading

【Apple Script】Shell、Python に引数を渡して戻り値を取得する方法

2020年2月25日 dev Apple Script, Python, Shell
【Apple Script】Shellのパスが違う

Shell に引数を渡して戻り値を取得する Apple Script のコード set arg1 to "123" set test2 to do shell script " test1=

Continue reading

【Python】Shell、Apple Script に引数を渡して戻り値を取得する方法

2020年2月25日 dev Apple Script, Python, Shell
【Apple Script】Shellのパスが違う

Python から Shell 経由で Apple Script のコードを使う。 Pythonファイル(test.py) import subprocess if __name__ == '__main__&

Continue reading

【Shell】Python に引数を渡して戻り値を取得する方法

2020年2月25日 dev Python, Shell
【Apple Script】Shellのパスが違う

Python に引数を渡して戻り値を取得する Shell コマンド test1=$(python test.py 123) echo $test1 test.py import sys arg1 = "&quo

Continue reading

【Shell】Macの画面に通知ダイアログを出す方法

2020年2月23日 dev Apple Script, Shell
【Apple Script】Shellのパスが違う

AppleScript 経由で Shellからでも通知ダイアログを出せる。 #!/bin/sh /usr/bin/osascript -e 'display notification "hogehog

Continue reading

【Shell】パイプでつなげた while 内の変数を外で使いたい場合

2020年2月20日 dev Shell
【Apple Script】Shellのパスが違う

find コマンドを使ってファイル検索をしてから、パイプの後に while を使うと、 cd "【指定のフォルダ】" list1='' find . -type f -maxdep

Continue reading

【Automator】メニューバーのギアアイコンを消す方法

2020年2月20日 dev Automator, Shell
【Apple Script】Shellのパスが違う

Automator のプログラムを実行させたとき、 別のプログラムを走らせると、ギアアイコンがクルクル回ったままになる時がある。

Continue reading

【Shell】半角スペースが入ったファイル名の扱いに注意

2020年2月20日 dev Shell
【Apple Script】Shellのパスが違う

カレントディレクトリの中に入っているファイル一覧を表示しようとしたとき、 以下のように記述すると、 dir="$(dirname $0)/*" find $dir -maxdepth 0 -type

Continue reading

投稿ナビゲーション

«前の記事 1 2 3 4 次の記事»

Google 検索

サイト内 検索

WordPress Theme: Tortuga by ThemeZee.