1
vote
2answers
91 views

How to invoke shell script while staying in interactive mode

When I call: execl("/bin/sh", "/bin/sh", (void *) NULL); The /bin/sh/ program is started, which opens a shell in which I can type commands. However, if I call: execl("/bin/sh", "/bin/sh", ...
5
votes
3answers
615 views

Why doesn't '>' redirect error messages from gcc?

I stored the following program in new.c int main() { a; return 0; } It returns an error message. I want to send this message to a file. So I used the following command gcc new.c > ...
4
votes
2answers
148 views

Wait until SSH succeeds creating a port forwarding

I am calling ssh (OpenSSH) from a OSX/Linux-C++-Application via fork/exec to create a dynamic port forwarding. This is done using batch mode (-o BatchMode=yes) and a private key which is supplied to ...
1
vote
5answers
37 views

Why does the shell perform pathname expansion for utilities?

This question is a sequel of how does grep work? It seems that the shell does the expansion of *.* to all applicable/available files and provide that to utilities like grep. Why does the shell need ...