So I want to match just the domain from ether:
http://www.google.com/test/
http://google.com/test/
http://google.net/test/
Output should be for all 3: google
I got this code working for just .com
echo "http://www.google.com/test/" | sed -n "s/.*www\.\(.*\)\.com.*$/\1/p"
Output: 'google'
Then I thought it would be as simple as doin...
So, I'm trying to install gcc for SimpleScalar-3.0, and I keep running into trouble when I execute the command make install LANGUAGES="c c++" CFLAGS="-O3" CC="gcc" as per the instructions in this wiki (Link)
I've included the entire output of the command as it runs in the first scroll box and the error message in the second scroll box. ...
I am working in PHP with Postgresql as backend. The database is already designed by others. Now I want to retrieve image from the database using PHP. But I'm not able to retrieve image from the database. I using this code to retrieve image but it shows only unreadable characters in the webpage. Sometimes it shows a small icon (like when...
we have a small app that doing trivial stuff, no GUI.
we was using Linux, but the library/framework available for Linux is highly less than that for windows, it was such a pain to develop under Linux.
So we want to use windows, but windows is too big for the trivial app, is there any solution that i can use windows and not losing OS's...
I am new to bash and Linux.
I have a program I have written that I want to create multiple simultaneous instances of.
Right now, I do this by opening up 10 new terminals, and then running the program 10 times (the command I run is php /home/calculatedata.php
What is the simplest way to do this using a bash script?
Also, I need to know ...
I created an app which is need to run in linux started by crontab. An error happened when it tried to connect oracle database: it returned SQLO_INVALID_DB_HANDLE. But if started it manually everything is okay.
I bet there are no path-related mistakes here, because everything goes well except the connection to the Oracle database. O...
hi,
I have a file dir1/foo1 in CVS. I want to create a "cvs copy" of this file in CVS to dir1/foo2
I want to do this so as to retain the cvs history . (foo2 will only have a function defined in foo1)
can anyone please help with the command line syntax?
...
As title said, I have C program complied and created a binary in 64-bit machine.Will this binary work under 32-bit ?
...
#something here
port 4444
#something here
port 4444
So I have file like above , I would to find the line with word "port" and increment the number(the number can be any number - not necessary it's fixed at 4444) next to it by 1.
For example,result file should be of the form
#something here
port 4444
#something here
port 4...
Hi,
I'm trying to get SCTP to work.
I wrote a simple client and server and tested it with localhost(127.0.0.1 as server).
it works perfectly, the server bind a port , listen and accept a socket and the client connect to the server and send it a message.
When I set up my sctp server in a remote server(eg. 192.168.0.200) , the client get...
The following C code illustrates a problem I'm seeing on Linux 2.6.30.5-43.fc11.x86_64:
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main() {
char buf[1024];
void *base;
int fd;
size_t pagesz = sys...
I am having a problem with a couple of my linux boot scripts, specifically the ones that start up my Oracle 10g database and my oc4j container.
I have used chkconfig to tell Linux to start the database before the container, however, it seems that the container starts before the database which oc4j does not like at all. I can get to my a...
Hey
I am basically trying to write a pstree-like command except that it should follow processes across machines.
What I mean is that if I run this :
$ ssh $node sleep 1000
Then the command should display something like this :
ssh $node -- ($node) sleep 1000
And if I'm running :
$ ssh $node ssh $node sleep 1000
ssh $node---($nod...
As outline in a previous question I asked.
A website can be launched by doing this:
Desktop.getDesktop().browse(new java.net.URI("www.google.com"));
This works fine in Ubuntu(gnome), but it doesn't appear to work in OpenSUSE(KDE flavour). There is a bug lodged with Sun about this.
Any ideas on alternate ways to do this, that will wo...
Hello all,
I'm using a real time signal in Linux to be notified of the arrival of new data in a serial port. Unfortunately this causes sleep calls to be interrupted when there is signal.
Does anybody know of a way to avoid this behavior.
Edit:
I tried using a regular signal (SIGUSR1) but I keep getting the same behavior.
Thanks,
Joao
...
What is the size (in bytes) of an SSH login request?
In fact I just want to know what is the size of the login SSH request when it is send from the client to the SSH server.
For a bandwidth point of view.
If it is a regular user/password login.
...
I am running a Linux box running 2.6.9-55.ELsmp, x86_64.
I am trying to set the TCP receive window by using the setsockopt() function using C. I try the following:
rwnd = 1024;
setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&rwnd, sizeof(rwnd));
The code segment above is in a client program that receives data from a server. When I k...
Scenario :
I mapped a network drive on a Win XP machine and I double click a .bat file to execute this Ruby script. The .rb and .bat file reside on this networked drive.
The batch file is as follows :
Z:
cd Z:\ABC\StatusCheck\
"C:\Program Files\Ruby\Bin\ruby.exe" Z:\ABC\StatusCheck\rubyScript.rb 6
The Ruby file is as follows :
requ...
In linux kenel process scheduler there is a priority type SCHED_FIFO. I want to change the scheduling policy.
I have two questions:
1- Where, in the kernel source code, is it mentioned that after a tick the cpu should belong to the interrupted process(Because in FIFO the process should remain until it finishes)?
2- In SCHED_RR where th...
I installed the Java 6 JRE on my VPS just fine, but I can't get the EE SDK installation to even run.
root@vps [/usr/java]# java -version
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode)
However, when I try to run java_ee_sdk-6-unix.sh:
./ ../ java_e...