I want to capture stdout of running process whose stdout is being redirected to /dev/null. I tried using system call fcntl(), however the moment I close fd "1", it was being allocated for other files ...
So I have a program that takes in user input and outputs text based on the input. EDIT2: I want to create a script that runs a C executable and the script feeds the C program input from a file and ...
I'm trying to do the following within a for loop: Find files that satisfy a condition Echo the name of the files to a log file. Gzip the file. I can get the script to find the files and echo their ...
I often want to feed relatively short string data (could be several lines though) to commandline programs which accept only input from files (e.g. wdiff) in a repeated fashion. Sure I can create one ...
I have certain application that opens a file with given path (presumably with fopen or derivative), reads the file, possibly writes to it and closes it. I have no control over this application other ...
I need to process image with several tools in a pipeline tool1 | tool2 | tool3 | .... It appeared though that one of the tools isn't designed to work in a pipeline and only works in format of ...
Is there a magic file name that gives the following effect? $ mkfifo /tmp/fifo1 && cat /tmp/fifo1 & $ foo --log-file /tmp/fifo # now I can see the log as the program runs I want ...
I'm trying to test the error handling in some software, in particular what happens when an error occurs reading from a file or pipe. Is there a simple way to send a certain amount of data to stdout ...