Skip to content
Kristian Rønningen
  • About
Kristian Rønningen
  • About

Faking input with IOCTL/TIOCSTI

April 29, 2021 / Kristian Rønningen / Linux

Have you ever had a script or program running in the background, with no TTY/console, asking for input to continue running? How do you tell it ‘y’ so it will keep going? By faking input using TIOCSTI! I had this issue when running a long chain of tasks in an ansible playbook, and a command […]

Faking input with IOCTL/TIOCSTI Read More »

Prefix command output in a shell with timestamp

November 15, 2011 / Kristian Rønningen / Linux

So I was writing this script that logged certain things to a file using a regular redirect. My script was running various commands that outputted a random amount of lines, all in random formats. I wanted to have a timestamp prefixing all of that, similar to what you get in logs written by syslog. I

Prefix command output in a shell with timestamp Read More »

Tail with word highlighting

October 22, 2011 / Kristian Rønningen / Linux

If you’ve ever ran tail -f on a busy file and tried to find certain words or patterns as they fly by, then this little “trick” might be of some help:

Tail with word highlighting Read More »

Recent Posts

  • Faking input with IOCTL/TIOCSTI
  • Prefix command output in a shell with timestamp
  • Tail with word highlighting

Archives

  • April 2021
  • November 2011
  • October 2011

Copyright © 2025 Kristian Rønningen | Powered by Astra WordPress Theme