Created
February 8, 2018 16:49
-
-
Save EifelMono/255f8b2487094f8d09b2c90b296f304a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ip= "192.168.179.1"; | |
var name = "abcdefgd"; | |
var commandTitle = $"echo -n -e \"\\033]0;[{name}]\\007\""; | |
var commandPing = $"ping {ip}"; | |
File.WriteAllText("ping.command", $"{commandTitle}\n{commandPing}\n"); | |
var commandLine= $"chmod +x ping.command; open ping.command"; | |
new Process() | |
{ | |
StartInfo = new ProcessStartInfo | |
{ | |
UseShellExecute = true, | |
FileName = "/bin/bash", | |
Arguments = $"-c \"{commandLine}\"", | |
} | |
}.Start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment