メインコンテンツにスキップ

Appleが発売した全てが一つに詰められたデスクトップコンピューターです。iMacは2006年1月以来、Intelプロセッサーを導入してきました。

7465回答 すべてを表示

Applescript terminal extension issue

I'm running MacOS Sierra 10.12.2 and trying to create a script (using applescript) for flushing my dns (sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say flushed) but I can't save it with a .sh extension which is the necessary ext to open terminal. It's forcing me to save as .scpt (or another ext based on file type, but none of the options have .sh as an option). Please help!

この質問に回答する 同じ問題があります

この質問は役に立ちましたか?

スコア 1
コメントを追加

1 件の回答

最も参考になった回答

You can accomplish the same thing in a simple bash file written through any text editor (like TextEdit or TextWrangler). It should look something like (# signs indicate commented lines, and #!/bin/bash must be the first line of the file):

Block Image

Save as a .sh such as flushCache.sh. From terminal cd to the saved file's directory, then run sh ./flushCache.sh

このアンサーは役に立ちましたか?

スコア 2

1件のコメント:

Awesome, I'll try that when I get home. Thanks for getting back to me!

さんによる

コメントを追加

回答を追加する

Jacob Carrillo さん、ありがとうございました!
統計データ:

過去 24時間: 0

過去 7 日: 6

過去 30 日: 8

今までの合計 46