I was hoping someone could help me, I need to reverse the contents of each line in a file. So basically this:
101.228.168.192
to
192.168.228.101
Is there a command I could use in a bash script, or even just the logic needed to get the job done. Thanks
...
Hi,
I want to run a script just ONCE by setting up a cron job using "at" command.
I'm using this now:
<?php
include "config.php";
if (isset($_POST['add']))
{
$sql = mysql_query("INSERT INTO {$table}(msg) VALUES('{$_POST['msg']}')");
if ($sql)
{
$cmd = "wget /var/www/index.php?id=" . mysql_insert_id() . " | sudo at " . $_POST['runa...
I have a data acquisition application broken into a client and a server.
The server is reponsible for grabbing data from the hardware, running some realtime analysis, and recording the data to disk when it's asked.
The client is a GUI that the operator can use to look at some pretty graphs (generated by the server), set some parameters...
I have a products table in a mysql.sql file. I wish to extract that one table and place it in it's own file. How would you go about doing this?
...
Hi,
Is there a way to lock a java process into memory.
Using something like mlock/mlockall it is possible to lock the memory of a process into memory, so that it doesn't get swapped out. With this approach is it possible to write a C wrapper before invoking the java process to lock the java process into memory? If so, how would the wr...
I am playing with X-windows, Xlib, etc. I want to create a X-window independent of the window-manager: meaning that I do not want the WM to put a frame, minimize-maximize, close, menu, title-bar, etc. in the window. I want to create a vanilla X window. How?
[edit]
Alternatively, how to I capture those events so my windowing app can at l...
Hey,
I'm looking to do a custom hash table implementation in C. Is there an MD5/SHA1 hash function already in the GNU library or do I have to use an external library for this?
Here's kinda what I'm looking for:
int hashValue;
hashValue = MD5_HASH(valToHash);
...
Hi, I am trying to compile the following example from http://www.otierney.net/objective-c.html. It consists of three files:
Fraction.h
#import
@interface Fraction: NSObject {
int numerator;
int denominator;
}
-(void) print;
-(void) setNumerator;
-(void) setDenominator;
-(int) numerator;
-(int) denominator;
@end
F...
Hi,
I have some daemon processes that crashes every now and then and I want to know how I can enable core dump generations.
I know that by default on linux ulimit for core dumps is zero so I need to set it to unlimited if I want to see core dumps for processes that I am running.
But what I want to do is to generate core dumps for daemon...
I have an array of double (size more than 60k entries), I have the frequency value. Now I want to create a sound from it using C/C++ which I can play on speaker. My OS is linux.
Thanks. I hope I am clear enough.
...
Any application or method can export SVG or any vector format to SWF from Ubuntu Linux?
...
Do you guys have some script or GUI tool that would give you nice and transparent listing of running java applications ? I'm using $ps ouput that I grep through for "java" keyword, but usually I'm running eclipse, tomcat, nexus, database IDE and a few others, all of them with many parameters and I'm spending too much time searching throu...
Hello,
I want to know what executables a script launches and in what order (and trace those executables recursively).
For example, let's say I have a bash script here (called abc.sh):
#!/bin/bash
ls
gcc
I'd like to run this script with a "trace/log command" and get something like this:
abc.sh -- ls
|-- gcc -- cpp
...
I am writing the command in crontab and its output is first asking the password.
Is there any way to supply the password with command like
mount -a < password
...
Hi, I have a fairly simply batch file to backup a Directory on Server 2008 using cwrsync to a Linux server, and to restore.
Backup script:
@ECHO OFF
SETLOCAL
SET CWRSYNCHOME=C:\Program Files (x86)\cwRsync
SET CYGWIN=nontsec
SET HOME=%HOMEDRIVE%%HOMEPATH%
SET CWOLDPATH=%PATH%
SET PATH=%CWRSYNCHOME%\BIN;%PATH%
rsync -e "ssh -i new.key"...
Currently I am considering:
VMWare Hypervisor ESXi
CentOS 5.5
Memcached 1.4.5
and dependencies
That is ALL. Is there anything else I need/any substitutions?
...
I want to remove php-5.3. completely from my machine after make it from source.
how can this be done?
When i try make uninstall i get:
make: * No rule to make target `uninstall'. Stop.
Thanks.
...
I have a file hello.c
#include<stdio.h>
void hello()
{
printf("Hello!\n");
}
A header hello.h
#ifndef _hello_
#define _hello_
void hello();
#endif
main.c
#include<stdio.h>
#include "hello.h"
int main()
{
hello();
return 0;
}
I am currently in the folder /home/user/name/programs
I am trying to build a static libra...
I'm using Ubuntu, and I've got the same problem with Lucid and Maverick.
From time to time, especially a few minutes after boot, the iowait goes between 50-100% and the box is unusable. Everything that tries to access the disk freezes.
I have the following setup:
Hard disk:
Model Family: Western Digital Caviar Green family
Devic...
I would like to install REDMine on my LINUX LAMP.
First i need to install ROR.
http://www.redmine.org
Provide steps if anybdoy has done installation
...