All Questions
8 questions
1
vote
1
answer
395
views
Why pipes not working for cat | cat | ls?
I really need help and any suggestions will be very welcomed. Me and a mate have coded a mini version of the Shell and I did parsing and executing parts. All is working properly except for some cases ...
0
votes
1
answer
554
views
Reading data from standard input using two threads
I am trying to read data from standard input (stdin) using two threads but I'm not able to read data properly. I tried on Linux platform using gcc compiler. I am trying to read data using cat command ...
0
votes
0
answers
382
views
Use pipes to change the input entered using cat command in child process in C
I have an operating systems problem where I need to execute the 'cat' command in the child process. The child process is created using fork() system call. While running 'cat' command in the terminal, ...
0
votes
1
answer
261
views
Executing cat|grep|grep using 2 pipes
Title is self-explanatory on what I want to do so here is my current code:
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
int main() {
...
0
votes
1
answer
2k
views
Command line tool to get binary data as String in Windows like Cat?
So I have program that transforms data by piping the string into stdin like so.
cat input.mp3 | myexe
except I want this commandline tool to run on Windows.
type input.mp3 | myexe.exe
and cat and ...
2
votes
2
answers
4k
views
Use cat output in another program with pipe in C
I want to run: cat somefile | program > outputText in a UNIX system.
I have looked at many things such as pipe, using popen, dup2, etc; I am lost.
Basic code should be:
Read whatever output cat ...
2
votes
2
answers
2k
views
cat with fork execvp pipe and dup2
This is one step of a set of exercises I'm doing. The program I write should take more than two arguments. The use of the first argument is not implemented yet. The rest of the arguments are a list of ...
0
votes
3
answers
383
views
Send input to a program and get control back
I have been stuck on this for some time.
Let's say I have a C program like the following. I want to be able to send this program some string and get the control after that.
If I do:
--> cat myfile | ...