Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Mac Terminal – Kill App

Posted on April 9, 2018 By David Kittell
function KillApp
{
  appname=$1
  ps -ax | grep $appname | sed 's/^[ \t]*//' | cut -d " " -f1 | while read -r pid cmd ; do
    echo "Killing $pid"
    kill $pid
  done
}
KillApp Term
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Mac OS X Shell Mac OSX UNIX UNIX Shell Scripts

Post navigation

Previous post
Next post

Related Posts

Excel – Find Comma Replace With LineBreak

Posted on August 11, 2015October 26, 2015

Selected the range of cells you need to replace. Go to Home > Find & Select > Replace or Ctrl + H Find what: , Replace with: CTRL + SHIFT + J Click Replace All Somehow CTRL + SHIFT + J is registered as a linebreak. Reference: http://stackoverflow.com/questions/14856501/substitute-a-comma-with-a-break-link-in-a-cell Originally Posted…

Read More

PHP WordPress – Check If MultiSite From CLI

Posted on November 3, 2015

require(dirname(__DIR__) . ‘/html/wp-config.php’); if(defined(‘WP_ALLOW_MULTISITE’)) { if (constant("WP_ALLOW_MULTISITE") == true) { echo "\nThis site is MultiSite\n"; } else { echo "\nThis site is not MultiSite\n"; } } else { echo "\nThis site is not MultiSite\n"; } All information on this site is shared with the intention to help. Before any source…

Read More

Get City/State/Country From IP

Posted on September 27, 2013October 26, 2015

I have a lot of possible options on this page, as I find time I’ll clean this page up a bit to make it more user friendly. C# Free, Fast JavaScript Free, Fast Microsoft SQL Using GeoPlugin.net XML Option [raw] All Values geoPlugin: geoplugin_request: 208.67.222.222geoplugin_status: 200geoplugin_credit: Some of the returned…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes