Cat
Ok, I dont know if there is a really newbie question or what, but Im writing the output of a game server to a fifo file with
Code:
cat < server.out | ./hlds_l .... 2> /dev/null 1> /dev/null & How can I do this with cat? |
The output is stdout, AKA as descriptor 1. So if you write "1> /dev/null", it's going absolutely nowhere.
|
Well, me and a buddy were doing this before a while back, working on this thing. And it worked actualy, all we did was write "quit" to server.out, and it stoped the server, so how do I do this?
|
er...
echo quit > server.out |
OK, let's see if I get this. "cat < server.out" is in this case the same as "echo quit". So if you want to write that to a FIFO, what about "echo quit > fifofile"?
|
didnt, seem to work. But, maybe there is another way, I want to control the game server with a fifo with starting and stopping because looking up the pid is too much work. So last time, me and my buddy, were using a fifo file and writing quit.
Any ideas? |
what about using job numbers?
kill %1 -- job number 1 |
Ok, I figured out most of this the commands Ive been using have been working, the problem is, its seeming to take more than one output just to get the first output
if I do cat > server.out | echo quit it will echo quit, but I then have to type the command AGAIN when Im in the output of server.out with cat. so basicly it looks like this cat > server.out | echo quit quit any ideas why this is happening? |
All times are GMT -5. The time now is 08:55 AM. |