|
|
iTunes, the menu bar, unicode, and GeekTool
Just to add a bit of information that migt be useful for you.
If you want to find out whether or not some application, like iTunes in this example is running you can ommit one grep. Usually I see this:
The last grep to filter out the grep off the result. I think it's much easier to do if you take advantage of character classes. (cite of man grep)
So try this when your iTunes is running:
You see: The first slash is in a character class and so grep can't find itself because it does no longer contain "/Appli..." but "[/]Appli..."
Next thing to note is that there is a thing like the "HERE"-document in *nix and so in OS X too. (cite of man bash but true for all shells I know of)
If you also know, that osascript can read from standard input if you supply "-" instead of a filename, we can put this all together like this:
Just two last notes about the if-line:
1. the \ is there to make the following blank part of the string to search for
2. >/dev/null is there to suppress the output of grep. We are only interested in grep's return code.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:Hints1 new Hints in the last 24 hoursComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.14 seconds |
|