• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  1. Home
  2. kbnetguy
  3. Topics
K
  • Profile
  • Following 0
  • Followers 0
  • Topics 2
  • Posts 2
  • Best 0
  • Controversial 0
  • Groups 0

Topics created by kbnetguy

  • K

    Create Trigger to use macOS terminal to Ping domain

    General Discussion
    • • Aug 7, 2020, 5:05 PM • kbnetguy Aug 7, 2020, 7:52 PM
    2
    0
    Votes
    2
    Posts
    429
    Views

    R Aug 7, 2020, 7:52 PM

    @kbnetguy, this command should work on a Mac:

    dig +short www.triggercmd.com | tail -n1

    I included the tail -n1 to use only the first line in case the host name returns multiple IP's.

    You probably know this, but to assign the result to an environment variable you can do this:

    export IP=$(dig +short www.triggercmd.com | tail -n1) echo $IP

    If you must use ping, let me know. I had that command figured out for Linux, but Mac's ping and grep are different.

  • K

    Create Trigger to use macOS terminal to Ping domain

    Mac
    • • Aug 7, 2020, 5:02 PM • kbnetguy Aug 7, 2020, 7:54 PM
    2
    0
    Votes
    2
    Posts
    444
    Views

    R Aug 7, 2020, 7:54 PM

    @kbnetguy, I answered here:

    https://www.triggercmd.com/forum/topic/821/create-trigger-to-use-macos-terminal-to-ping-domain