Skip to content

Instantly share code, notes, and snippets.

Avatar
🛠️
Building

Laurence Cullen Laurence-Cullen

🛠️
Building
  • Cambridge, UK
View GitHub Profile
@FUT
FUT / ttyecho.c
Last active May 5, 2021
Send terminal command to a TTY terminal
View ttyecho.c
#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);