Skip to content

Instantly share code, notes, and snippets.

@lleqsnoom
lleqsnoom / Shell.hx
Created September 21, 2017 14:06
haxe linux/mac shell commands with pipes
package;
import sys.io.Process;
using StringTools;
class Shell
{
public static function main() {
trace(exec('ioreg -c IOSerialBSDClient | grep usbmodem | grep IODialinDevice | cut -d " -f 4'));
}
//
// Hello World server in C++
// Binds REP socket to tcp://*:5555
// Expects "Hello" from client, replies with "World"
//
#include "zmq.hpp"
#include <string>
#include <sstream>
#include <iostream>
#ifndef _WIN32