linux

Joining Line Breaks With Condition in SED

I have data that looks like this: > sq1 foofoofoobar foofoofoo > sq2 quxquxquxbar quxquxquxbar quxx > sq3 foofoofoobar foofoofoo > sq4 foofoofoobar foofoo I want to join the lines on the basis of ">sqi" header as cut-off line, i.e. yielding: foofoofoobarfoofoofoo quxquxquxbarquxquxquxbarquxx foofoofoobarfoofoofoo foofoofoobarfoofoo ...

Exclude .svn directories from grep

When I grep my Subversion working copy directory, the results include a lot of files from the .svn directories. Is it possible to recursively grep a directory, but exclude all results from .svn directories? ...

How to write a bash script that cuts images into pieces using image magick?

Hi, I have a number of input images that contain multile smaller images, all in a single row. All the contained images are the same size. So, for example, the image input.png may be 480x48 and contain 10 48x48 images, all in one row. Using the imagemagick convert tool (or any other tool supplied with the defaul imagemagick suite), I wa...

When a parent process is killed by "kill -9", will subprocess also be killed?

One of my colleague told me this morning, when he killed supervisord by "kill -9", the subprocesses of supervisord is not killed. He is quite sure about that, but I tried many times and did not find that happen. So when a parent process is killed by "kill -9", will linux ensure that it's sub-processes also been killed? ...

Which library would you consider on linux for DEA (Data Encryption Algorithm)?

I need a 3DES encrypt/decrypt library for my project. Do you know an implementation working on linux ? Linux is the target platform, but I essantially compile/debug on Windows. Therefore it could be really appreciated if it could work on Windows, while not mandatory. ...

Openfire Java Memory

Hi, I have openfire installed on my debian server. I want to know that whether openfire java memory should be less than server memory? For e.g. i have a server with 256 MB RAM now can i have openfire java memory more than 256 MB RAM or it should be less than 256. Please help Thanks, Pankaj ...

Will cron execute php files or only CGI scripts?

Can .php be used in Crontab function on Linux or wil it execute only .CGI scripts? I'm using Plesk Control panel, I did the settings as per the Crontab doc, but i think it's not executing the php files. Does any one have the Idea about what more to do with ...

Development of iPhone application in linux

I have to develop an iPhone application that is able to transfer real time data from a server to an iPhone. Some real time data examples are: cricket scores, stocks, etc. We have been told to develop our project in Linux using Objective C. As I'm completely new to this field, could anyone give me any ideas about how to start the pro...

How to build BlackBerry application on Linux?

I've read on some development blogs that it is nearly to impossible to build BlackBerry application properly on operating systems other than Windows. Any possible workarounds on veryfication, rapc usage etc may result in serious and hidden bugs. Please, share your knowlenge of the subject. ...

How to find virtual memory size and cache size of a linux system?

Is there any command to get virtual memory size, cache size and front side bus speed of a linux system? ...

Which easy programming language to use for parallel port programming under Linux?

My father would like to use Ubuntu for LPT programming (via a relay card). He is used to QBasic and PowerBasic but willing to learn a new (simple) language for his goals. What recommendations can you give me for this task? Python would be my favourite if the module pyParallel worked. If there are other modules available for Python, let...

In Ruby on Linux, how can I check for the existence of a named network interface like eth0?

In ruby 1.8.5, how can I check for the existence of a named network interface like eth0 or wan0 under linux? Even checking the existence would be a start. I'm aware that I could wrap a shell command to use ifconfig or somesuch, but would rather have a pure ruby solution. Another way of phrasing the question might be "If I was implemen...

Rhythmbox: how do I access the 'rating' field of a track through Python script?

I would like the capability to get/set the rating associated with a specific track through a Python. How do I achieve this? ...

Linux receive signal break for ttycontrol program

I would like to receive SIGINT if my process controlling /dev/ttyS2 receives BREAK on a serial port. I run this program from a shell. From what I discovered only "the terminal is the controlling terminal of a foreground process group, it will cause a SIGINT to be sent to this foreground process group" I tried make process making controll...

How to bind an application to a particular network interface in LINUX?

How to do it? Like in windows, we have ForceBindIP see website ...

Replacing specific non-printable characters in huge files from linux command line

I need to replace the ascii characters SOH and STX (start of header and start of text, ascii characters 1 and 2, respectively) in some really huge text files as quickly as possible... Is sed the way to go? What does that command look like? ...

How to have subpixel rendering of font for LCD (cleartype on windows) on linux ?

Hi SO Friends, I am working on embedded system, with own windowing system and rendering library. Before someday when I installed Ubuntu, to my surprise it has LCD subpixel rendering. It really looks cool to have it on my device. Because it is very readable. Currently I ask for particular glyph in freetype, freetype gives me one memory ...

Converting a .so file to a .jnilib file

I've got a .so library compiled for Linux under the ELF format, which is being used by a Java program. I'm trying to port this application to Mac OS X, and have discovered that OS X uses a different extension for these files, .jnilib. I've already figured out how to set up the PATH so that it correctly finds the files. However, OS X Java...

Installing java on linux using ssh

Hi I want to install java on many computers using ssh so I want to write a bash script that will do (roughly): for c in computers do scp jre--.rpm $c ssh $c 'sudu -s; chmod a+x jre--.rpm ; ./jre--.rpm; echo "success!"' done The problem is that during the java installation I need to "read" the notice and type "yes" at the en...

Compile Using MONO - C# with Reference To A C# Library?

Hi there, I have a C# library (DLL) // ProgramLib.cs // using System; namespace ProgramLibrary { public class Lib { public Lib() { Console.WriteLine("Lib Created"); } } } And I have the following console program // Program.cs // using System; using ProgramLibrary; class MainClass { ...