Skip to content

How to start node.js on port 80 on a linux server?

When I try to start node on port 80, the error tells me that the port is in use. I imagine that’s Apache. What is the proper way to “take over” port 80, and keep it that way after a server restart? (Linux xxxx.__.com 2.6.32-5-amd64 #1 SMP Tue Jun 14 09:42:28 UTC 2011 x86_64 GNU/Linux) Answer…

How to start java program with hidden terminal

How can i create shell script for linux, Which will start my java program and then exit itself Like:- create new process with no terminal-> java “Test”. exit terminal itself. i have tried with Fork and exec but i couldn’t get any of it please help me Answer I solved this by using Python s…

Doesn’t sh support process substitution <(…)?

On a Centos 6 machine, this works: and this doesn’t: I get: Nevermind the grep and tail. The problem is with the process substitution thingy: <(…) Can someone tell me what sh does differently here? [EDIT] Thanks for the answers! The problem arose while using capistrano for deployments. It defau…

find matching text and replace next line

I’m trying to find a line in a file and replace the next line with a specific value. I tried sed, but it seems to not like the n. How else can this be done? The file looks like this: And I’d like to change it to this Here’s what I tried: Answer This might work for you (GNU sed):