Skip to content

Instantly share code, notes, and snippets.

View Laurence-Cullen's full-sized avatar
🛠️
Building

Laurence Cullen Laurence-Cullen

🛠️
Building
View GitHub Profile
@FUT
FUT / ttyecho.c
Last active May 6, 2022 04:55
Send terminal command to a TTY terminal
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <string.h>
#include <unistd.h>
void print_help(char *prog_name) {
printf("Usage: %s [-n] DEVNAME COMMAND\n", prog_name);