Appify — create the simplest possible Mac app from a shell script. Alternatively, you can use Thomas Aylott's appify script to bundle your shell script into an OS X application. Mathias Bynen's article walks through how to use the script, how to create simple Mac apps from shell scripts. Nov 25, 2016  AppleScript’s do shell script is one of its. But could be a useful stopgap until a proper app wrapper is ready. Gatekeeper hard drive High Sierra history history of painting iCloud Impressionism iOS landscape LockRattler log logs Mac Mac history macOS macOS 10.12 macOS 10.13 macOS 10.14 macOS 10.15 malware Metamorphoses.

Using Automator.app and Platypus.app, I have been able to bundle a simple shell script I created to power cycle wi-fi on my MacBook Pro. Both resulting apps run properly, but have one glaring issue that I want to correct: The apps reference the shell script from outside of the program. How can I embed the shell script and reference it from the app's resources so that the app can run even if the original source file is moved?

Just to mention it, if you Get Info on a script, you can set it to be opened with the Terminal. This will run the script when you double-click it.

Otherwise, packaging a script in a .app bundle is trivial. Mac OS X will happily run any script identified as the application's executable.

You need to have this file structure in place:

  • Wrapper.app
    • Contents
      • Info.plist
      • MacOS
        • MyScript

Files in italic are actual files, the rest are directory.

Only one entry is required in Info.plist, and it's the one that identifies MyScript as the application's executable:

MyScript can be any script, with execution permissions and the correct shebang. Here's one that uses /bin/sh as the interpreter, but you really could have anything (#!/usr/bin/swift, #!/usr/bin/python, etc).

The script will run as you double-click the app bundle.

You can bundle anything else that you need with your script within the Contents directory. If you feel fancy, you can reproduce the standard executable bundle layout with a Resources directory and things like that.

Login with Facebook option trigger suggest to download an app

android,ios,facebook,osx,login

I found out what I was talking about. Facebook is adding a new feature which ask users if they want to get a link to the mobile app. This is in Beta right now but you will automatically eligible for the feature if: You have integrated the new Facebook Login..

linux - running a process and tailing a file simultaneously

bash,shell,tail

I would simply start the tail in background and the python process in foreground. When the python process finishes you can kill the tail, like this: #!/bin/bash touch /tmp/out # Make sure that the file exists tail -f /tmp/out & pid=$! python test.py kill '$pid' ..

Most USB devices are supported, as well as most USB memory card readers. The program supports connections over USB 2.0 as well as USB 3.0 and USB 3.1: the transfer speed is the best in the industry. This utility outperforms other media import solutions in a no frills and easy-to-use interface. Jul 15, 2020  The world's best image-editing software adds Cloud Documents for syncing to Photoshop on iPad, AI-powered Objects Selection and Content-Aware. A click rotates the image either way or calls up a dialog with detailed image information. Smart Photo Import's is free to try for 60 days and works in Windows versions 95 to XP, though we tested. Best mac image import software. Here are 18 of the best photo management software solutions, in no particular order, that are currently available on the market. These will give you a good idea of what the current standard is. Adobe Bridge. If you use the popular Adobe Creative Cloud software package, you will most likely already be very familiar with Adobe Bridge CC.

AWK write to new column base on if else of other column

linux,bash,shell,awk,sed

You can use: awk -F, 'NR>1 {$0 = $0 FS (($4 >= 0.7) ? 1 : 0)} 1' test_file.csv ..

CGDisplayCopyAllDisplayModes leaves out one valid mode

osx,swift,core-graphics

To further enhance the teaching and collaborative experience, BenQ's optional QDraw3 software offers two different modes: Desktop and Presenter. 'Furthermore, their simplicity eliminates any learning curve for teachers when incorporating these powerful tools into the classroom, while LAN control makes it easy for IT managers to maintain facility-wide installations; for school administrators, all of these benefits can be realized at a lower total cost of ownership.' Benq point draw software for mac free. In Desktop mode, users can present and make notes using any teaching or presentation materials.

There's public API that's only documented in the header. CGDisplayCopyAllDisplayModes() takes an options parameter, which is a dictionary. The docs (and even the headers) say that it's unused and you must past NULL, but you can pass a dictionary with the key kCGDisplayShowDuplicateLowResolutionModes and value kCFBooleanTrue. The option name is..

Run Boot2Docker from bash

osx,bash,docker,boot2docker

Replace your boot2docker start with boot2docker start && $(boot2docker shellinit) and you are good to go. $(boot2docker shellinit) will export all the Environment variables needed.

using sed to replace a line with back slashes in a shell script

regex,bash,shell,ssh,sed

You can use it with ssh and heredoc like this: ssh -t -t [email protected]<<'EOF' sed 's~out_prefix=orderid ^2d+ updatemtnotif/~out_prefix=orderid ^2d+ updatemtnotif_fr/~' ~/path/to/file exit EOF PS: It is important to quote the 'EOF' as shown..

shell script cut from variables

bash,shell,shellcode

With GNU grep: grep -oP 'aaa&K.*' file Output: 123 456 K: ignore everything before pattern matching and ignore pattern itself From man grep: -o, --only-matching Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line. -P, --perl-regexp Interpret PATTERN as a..

Eclipse CDT - No Console Output on OSX

c++,eclipse,osx,terminal,64bit

Are you using the right compiler? If you are compiling with Cross GCC it might not run on a 64bit OS X device. Try using MacOS GCC for compiling if so.

How do I align my output?

I'd rewrite that as: #!/bin/bash while read -ra hello; do name=${hello[8]} if [[ $name '$1'* ]]; then log=${hello[2]} echo '$log $name' fi done | column -t read -ra splits the input line and stores the words in the 'hello' array. [[ $name '$1'* ]] is a built-in way..

Call to implicitly-deleted copy constructor in LLVM(Porting code from windows to mac)

c++,osx,c++11,compiler-errors,llvm

This line of code is very ambiguous: for (auto it : _unhandledFiles)//ERROR HERE auto uses template argument deduction, so std::string s; std::string& sr = sr; auto x = sr; in the above code x is deduced to be of type std::string, not std::string&. So your loop is equivalent to: for..

How to get CPU utilization in % in terminal (mac)

osx,terminal,cpu

This works on a Mac (includes the %): ps -A -o %cpu | awk '{s+=$1} END {print s '%'}' To break this down a bit: ps is the process status tool. Most *nix like operating systems support it. There are a few flags we want to pass to it: -A..

How do you work with views in MainMenu.xib?

objective-c,xcode,osx,cocoa

So the default is that your main application window is an outlet in the app delegate. You should keep MainMenu.xib's owner as the app delegate. A common alternative, if you are creating your own custom window controller, is to create a property in the AppDelegate of type CustomWindowController, then in..

How to uninstall all python versions and use the default system version of OS X 10.10?

python,osx

The file /usr/bin/python (and /usr/bin/pythonw, which is a hard link to the same file) is actually a launcher program that invokes the default version of Python from /System/Library/Frameworks/Python.framework/Versions. You can select the version (2.6 and 2.7 in Yosemite) the launcher invokes using either the defaults command or the VERSIONER_PYTHON_VERSION environment..

Macos Shell Script App Wrappers

Stuck with creating an event and formatting dates (Swift - EventKit - OS X)

ios,osx,swift,eventkit,ekevent

dateString doesn't match the format you specified. Why not use the built-in short style? This appears to work: let dateFormatter = NSDateFormatter() dateFormatter.dateStyle = .ShortStyle var dateString = '07/16/2015' var startDate = dateFormatter.dateFromString(dateString) var endDate = dateFormatter.dateFromString(dateString) startDate and endDate are optionals, so you'll have to unwrap them. In this..

Linux-wget command

linux,shell,wget

Try this to create a string variable n, with no leading whitespace (thanks @011c): n='10.0.0.135.527' wget http://infamvn:8081/nexus/content/groups/LDM_REPO_LIN64/com/infa/com.infa.products.ldm.ingestion.server.scala/'$n'-SNAPSHOT/com.infa.products.ldm.ingestion.server.scala-'$n'-20150622.210643-1-sources.jar ..

Matching string inside file and returning result

regex,string,bash,shell,grep

Using sqlite3 from bash on OS X seems fairly straightforward (I'm no expert at this, by the way). You will need to find out which table you need. You can do this with an interactive session. I'll show you with the database you suggested: /Users/fredbloggs> sqlite3 ~/Library/Application Support/Dock/desktoppicture.db SQLite version..

Initializing a xib view as a subview of another NSView

objective-c,osx,cocoa,xib,nib

You could use the loadNibNamed:owner:topLevelObjects: method. Here's an example: NSArray *views = nil; [[NSBundle mainBundle] loadNibNamed:@'TestView1' owner:nil topLevelObjects:&views]; [self.view addSubview:[views lastObject]]; The above code will load the top-level contents of the XIB into an array. Per the documentation: Load a nib from this bundle with the specified file name and..

How to replace newlines/linebreaks with a single space, but only if they are inside of start/end regexes?

regex,linux,shell,unix,replace

You can do it using awk as: awk '/[x/{f=1} {if(f)printf '%s',$0; else print $0;} /y]/{print '; f=0}' Output: [x data1 data2 data3 data4 y] [a data5 data 6 data7 data 8 b> [x data y] You can also simplify to: awk '/[x/,/y]/{ORS='; if(/y]/) ORS='n';}{print}' Output: [x data1 data2 data3 data4..

ffmpeg: wmv files generated on Mac can't be played in Windows

windows,osx,ffmpeg,file-conversion,wmv

You can try a codec for encoding instead. Try this. ffmpeg -i input_gif -b:v 2M -vcodec msmpeg4 -acodec wmav2 output_wmv You may find this important..

Shell script to loop over files with same names but different extensions

linux,bash,shell

anubhava's solution is excellent if, as they do in your example, the extensions sort into the right order. For the more general case, where sorting cannot be relied upon, we can specify the argument order explicitly: for f in *.ext1 do program '$f' '${f%.ext1}.ext2' done This will work even if..

how to deletes line from a text file that are taken from another file [duplicate]

shell,awk,sed,grep,sh

Something like this with grep: grep -vxf lines.txt data.txt > no_dupplicate_lines.txt Sample: AMD$ cat lines.txt Line2 Line4 AMD$ cat data.txt Line1 Line2 Line3 Line4 Line5 AMD$ grep -vxf lines.txt data.txt Line1 Line3 Line5 Print the lines that are not matching (-v) the exact lines (-x) from the file lines.txt (-f..

ASP.NET vnext overriding status code set in controller. Is this a bug?

osx,asp.net-5,kestrel

The behavior of void returning action was recently changed to not convert to 204 status code. However, for you scenario you could use the CreatedAtRoute helper method(this actually creates a CreatedAtRouteResult) which sets the Location header. [HttpPost] public void Post([FromBody]CrudObject crudObject) { return CreatedAtRoute(routeName: 'GetByIdRoute', routeValues: new { id =..

Use Unix Executable File to Run Shell Script and MPKG File

osx,shell,unix

The most common issue when handling variables containing paths of directories and files is the presence of special characters such as spaces. To handle those correctly, you should always quote the variables, using double quotes. Better code would therefor be: sudo sh '$path/join.sh' sudo sh '$path/join2.sh' It is also advised..

Mac OSX - Allow for user input in shell script via GUI or Prompt

osx,bash,shell

From what I understand I would recommend you look in to Applescript as this will allow you to have a GUI Interface as well as executing 'SHELL' commands. First of all I would open 'Script Editor' program that comes preinstalled on Mac's This is an example script which asks for..

Why can I view some Unix executable files in Mac OS X and not others?

git,bash,shell,unix,binary

Executable files may be scripts (in which case you can read the text), or binaries (which are ELF formatted machine code). Your shell script is a script; git is an ELF binary. You can use the file command to see more detail. For example, on my nearest Linux system: $..

Change NSTextField border and BG color while editing

osx,swift,cocoa,nstextfield

You can set the delegate of NSTextField: nameTextField.delegate = self then you can set a different state: func control(control: NSControl, textShouldBeginEditing fieldEditor: NSText) -> Bool { nameTextField.bezeled = true nameTextField.backgroundColor = NSColor.textBackgroundColor() return true } func control(control: NSControl, textShouldEndEditing fieldEditor: NSText) -> Bool { nameTextField.bezeled = false nameTextField.backgroundColor = NSColor.windowBackgroundColor()..

Missing one condition to display a string

The 'grep' command uses a regular expression to match text. Use a '^' before the expression, to match from the start of the line. So, you can change the line name=$(echo $hello | cut -d' ' -f9 | grep $1) to name=$(echo $hello | cut -d' ' -f9 | grep..

oh-my-zsh error after upgrade: ~/.oh-my-zsh/lib/misc.zsh:3: parse error near `then'

Macos Bash Script

shell,zsh,zshrc,oh-my-zsh

Use upgrade_oh_my_zsh upgrade to the latest version. This issue fix here..

Capitalize all files in a directory using Bash

osx,bash,rename

Jun 17, 2020  Mac EMR software is electronic medical records software built specifically to run on the Mac operating system (OS). This OS is designed specifically for the Apple hardware it runs on, which supports easy integration between different types of Apple products. NextGen Financial Suite is a revenue-boosting platform that includes revenue cycle management (RCM) services and medical billing services, which combine innovative technology and billing expertise to help your practice collect every dollar you earn. Best medical billing software for macintosh. Mar 12, 2020  CollaborateMD is a cloud-based medical billing software that helps your claims get to the medical insurance payer as quick as possible. The solution works best for small to medium sized practices due to the affordable price and ease-of-use. MacPractice EHR for Mac and iEHR for iPad was designed with efficiency as a top priority. Chart, order, e-prescribe, review and submit charges quickly. When using both EHR and iEHR, you have the flexibility to change from one device to another during the course of a visit.

In Bash 4 you can use parameter expansion directly to capitalize every letter in a word (^^) or just the first letter (^). for f in *; do mv -- '$f' '${f^}' done You can use patterns to form more sophisticated case modifications. But for your specific question, aren't you..

Crash when processing `__Atom` class object in Objective C (using Objective C runtime )

objective-c,osx,objective-c-runtime

Macbook keeps shutting itself down. Aug 26, 2019  The process for resetting this memory is the same across the board: Make sure your Mac is powered off. Press and release the power button (or Touch ID button on some MacBooks) then immediately press and hold Option +. After around 20 seconds you can release these keys, and your Mac should start up.

+[NSObject isSubclassOfClass:] is a class method for NSObject and not all classes are subclasses of NSObject. It seems as if you have find private class that is not a subclass of NSObject, so it requires a more delicate handling for checking for inheritance. Try: BOOL isSubclass(Class child, Class parent) {..

AWK count number of times a term appear with respect to other columns

linux,shell,command-line,awk,sed

Almost same as the other answer, but printing 0 instead of blank. AMD$ awk -F, 'NR>1{a[$2]+=$3;b[$2]++} END{for(i in a)print i, a[i], b[i]}' File pear 1 1 apple 2 3 orange 0 1 peach 0 1 Taking , as field seperator. For all lines except the first, update array a. i.e..

How to extract single-/multiline regex-matching items from an unpredictably formatted file and put each one in a single line into output file?

linux,shell,unix,replace,grep

Assuming that your document is well-formed, i.e. <b> opening tags always match with a </b> closing tag, then this may be what you need: sed '[email protected]<[/]?b>@n&[email protected]' path/to/input.txt | awk 'BEGIN {buf='} /<b>/ {Y=1; buf='} /</b>/ {Y=0; print buf'</b>'} Y {buf = buf$0} ' | tr -s ' ' Output: <b>data1</b>..

Change the “about this” window on mac app

java,osx,deployment

If your application is an .app bundle then it should have an info.plist. Inside the info.plist will normally contain version information that should display the version number: <key>CFBundleShortVersionString</key> <string>2.0.0</string> Typically the version information here is populated in places that call for it (eg. About). To change the name that would..

Calling find more than once on the same folder tree

linux,bash,shell,unix,find

Try this: find . -mmin +35 -or -mmin -25 find supports several logical operators (-and, -or, -not). See the OPERATORS section of the man pages for more details. EDIT: In response to the question about processing the two matches differently, I do not know of a way to do..

OSX tmux configuration session open file in vim automatically

osx,session,vim,configuration-files,tmux

Explicitly inserting a space should do it: send -t 1 vim space ~/Path/to/my/file enter or you can quote command arguments (I prefer this one): send -t 1 'vim ~/Path/to/my/file' 'enter' ..

Identifying when a file is changed- Bash

bash,shell,unix

I would store the output of find, and if non-empty, echo the line break: found=$(find . -name '${myarray[i]}') if [[ -n $found ]]; then { echo '$found'; echo '<br>'; } >> '$tmp' fi ..

Read plist inside ~/Library/Preferences/

objective-c,xcode,osx

You need to use NSString method: stringByExpandingTildeInPath to expand the ~ into the full path. NSString *resPath = [@'~/Library/Preferences/' stringByExpandingTildeInPath]; NSLog(@'resPath: %@', resPath); Output: resPath: /Volumes/User/me/Library/Preferences ..

How to get NSTableView to use a custom cell view mixed with preset cell views?

osx,swift,cocoa,nstableview,nstableviewcell

I'd try just giving the default cell your own identifier in Interface Builder.. ..then just use that in conjunction with makeViewWithIdentifier:: func tableView(tableView: NSTableView, viewForTableColumn tableColumn: NSTableColumn?, row: Int) -> NSView? { var viewIdentifier = 'StandardTableCellView' if let column = tableColumn { switch column.identifier { case 'nameColumn': viewIdentifier = 'nameCellView'..

How to display Apple San Francisco's numbers mono-spaced rather than proportionally?

osx,fonts,apple

Number formatting of an OpenType font requires having control over which features are active during text shaping, something which typesetting tools will offer (InDesign, XeLaTeX, etc), but which normal productivity tools still (after a decade of Adobe, Apple, and Microsoft all agreeing on using OpenType!) don't offer. Notes included. So,..

Using the shell provided with NodeJS

javascript,node.js,shell,require,node-modules

As per issue #5431, looks like the Node.JS REPL doesn't find globally-installed modules and this is expected behaviour. In the article linked from that issue, it reads: If you’re installing something that you want to use in your program, using require('whatever'), then install it locally, at the root of your..

How to extract first letters of dashed separated words in a bash variable?

linux,string,bash,shell,variables

This isn't the shortest method, but it doesn't require any external processes. IFS=- read -a words <<< $MY_TEXT for word in '${words[@]}'; do MY_INITIALS+=${word:0:1}; done ..

pcap_dispatch() always returns 0 on Mac OSX for wifi interface

osx,pcap,libpcap,arp

Free expenses app for mac. App Store Expense Monitor for Mac Free WetFish Software Mac OS X 10.5 Intel/PPC/.6 Intel, Mac OS X 10.6/Intel Version 1.2.3 Full Specs Average User Rating. Mar 28, 2017  Awesome App Flow - Every Mac user has a very busy day and that is why Expenses is designed to be simple with an intuitive app flow that helps to get the work done. Categorise your Expenses - Categorising helps to group expenses for easy tracking and effective completion. Expenses provides the feature to assign a category to a expense in a. Oct 16, 2019  Easy integration and decent user-interface make this app a must-have tool for every Mac user. Install Bills on Mac. BudgetTail; BudgetTail is yet another powerful and free-to-use Finance app for Mac users. The app has been updated to its latest version and now has a number of extra tools to manage the money flow and expenses of the users.

If you are capturing in monitor mode, you will be getting native 802.11 packets, which do not look like Ethernet packets, so filtering similarly to Ethernet will not work. Furthermore, if you're capturing in monitor mode on a protected network, i.e. a network using WEP or WPA/WPA2, everything past the..

How do I silence the HEAD of a curl request while using the silent flag?

bash,shell,curl,command-line,pipe

Try this: curl --silent 'www.site.com' > file.txt ..

Display django runserver output from Vagrant guest VM in host Mac notifications?

python,django,osx,notifications,vagrant

Why not run a SSH server on the VM and connect from the host via a terminal? See MAC SSH. Which OS is running on the VM? It should not be too hard to get the SSH server installed and running. Of course the VM client OS must have an..

How to programatically make a key shortcut?

osx,bash,task-switching

Macos Shell Script

You can use Applescript to achieve this. To focus on a specific application: tell application 'Finder' to activate And to emulate an actual Cmd+Tab input: tell application 'System Events' key down command keystroke tab key up command end tell Applescript files (*.scpt) can be run through the command line with..

Multiple line search in a file using java or unix command

java,shell,unix,command

You can find like this. File file = new File('data/pattern.txt'); Pattern pat = Pattern.compile('subclass 'Pool1' 11:22:33:44:55:66 {s*dynamic;s*}'); String content = Files.lines(file.toPath()).collect(Collectors.joining('n')); Matcher m = pat.matcher(content); while (m.find()) { System.out.printf('found at %d-%d%n', m.start(), m.end()); } ..

How to test if a command is a shell reserved word?

Macos Shell Script App Wrapper

Best Macos Apps

bash,shell

Script

#!/bin/bash string=$1 if [[ $(type '$string' 2>&1) '$string is a shell'* ]]; then echo 'Keyword $string is reserved by shell' fi ..

Delete some lines from text using Linux command

linux,shell,sed,grep,pattern-matching

The -v option to grep inverts the search, reporting only the lines that don't match the pattern. Since you know how to use grep to find the lines to be deleted, using grep -v and the same pattern will give you all the lines to be kept. You can write..