I am getting a stream of numbers in a pipe, and would like to perform some operations before passing them on to the next section, but I'm a little lost about how I would go about it without breaking the pipe.
for example
> echo "1 2 3 4 5" | some command | cat
1 4 9 16 25
>
Would you have any ideas on how to make something like this...
How can I access to the contents of a zip file?
I'm trying write a program in C and I want use the libraries used by zip.
...
Hi,
I need to create a server-side application that takes an array of images and produces FLV file with animated slideshow. Does anybody know what technology can I use to achieve this? I'm primarily looking for a linux tool, but if you know any windows-based technology, it will be appreciated too. You can see what I'm looking for here. ...
Are there any good HTML\CSS IDEs available for Linux? I don't mean a WYSIWYG editor; I pretty much just need text editor with syntax highlighting and a preview pane w/something similar to Firebug. Does anything like that exist?
...
Hi!
While working under andLinux on a bash script that has to sudo some stuff, I arrived at the following line.. this line seems to provide root access but doesn't require a valid password:
echo | sudo -S cat /etc/shadow >/dev/tty
Can anyone explain why this happens?
Without the 'echo |' or the '>/dev/tty' this doesn't work and reques...
I'm trying to remotely open a port in a iptables firewall using Capistrano. Here's my task:
desc "Open up a port in the firewall"
task :open_port, :roles => :all do
port = variables[:port] || nil
if (!port)
puts "You must specify the port number"
next
end
run "#{sudo} /sbin/iptables -I RH-Firewall-1-INPU...
I would like to invoke my chrome or firefox browser when a file that I specify is modified. How could I "watch" that file to do something when it gets modified?
Programmatically it seems the steps are.. basically set a never ending interval every second or so and cache the initial modification date, then compare the date every second, w...
Is there a Linux command to easily find out which partition/mount a directory or file is on?
(This is probably a RTFM question, and I feel guilty for asking it, but somehow, I can't find a good answer on google just yet..)
...
I am running Selenium Java RC on Linux. When I execute my program it opens only one Firefox window where commands display; it doesn't open a second Firefox window.
...
My programs run out of memory like half of the time I run them. Under Linux I can set a hard limit to the available memory using ulimit -v mem-in-kbytes. Actually, I use ulimit -S -v mem-in-kbytes, so I get a proper memory allocation problem in the program and I can abort.
But... ulimit is not working in OSX 10.6. I've tried with -s and...
I am writing an editor in assembly 64bit mode in linux.It runs correctly when I debug the program in GDB but it does not run correctly when I run it normally it means it has runtime errors when I use ./programName .
...
Is there a way to stream all audio from a laptop (which has low quality speakers) to a desktop with much better speakers in linux (on both computers)? I think that this would have to be a kernel driver, since it would have to fit under the alsa system to make it application transparent.
Thanks,
Andrew
...
Hello,
I got an old library which does some manipulation with files on floppy\ CD (transferring the files on network paths).
This library has a thread which checks on each second whether the file (e.g. the floppy diskette\ the CD disk) is mounted.
Why? What operations can be done only on mounted files?
Thanks a lot.
...
my code is as follows: preload.c, with the following content:
#include <stdio.h>
#include <stdlib.h>
int __attribute__((constructor)) main_init(void)
{
printf("Unsetting LD_PRELOAD: %x\n",unsetenv("LD_PRELOAD"));
FILE *fp = popen("ls", "r");
pclose(fp);
}
then in the shell (do the 2nd command with care!!):
gcc prel...
Hi all,
This is my 3rd post in the process of learning sed. I have a hypothetical requirement. I want to be able to replace 3rd word in each line by 'was', where words are delimited by space(s).
bash$ cat words
hi this is me here
hi this is me again
hi this is me yet again
hi this is me
Desired output:
hi this was me h...
Hi Kernel Gurus,
i'm writing a char device in linux - xubuntu ,
and i'm wondering if i have to implement ioctl OR
maybe i can use the regular read write funcs??
thanks all,
Amit
...
What I'm trying to accomplish:
On Ubuntu 10.04 I'd like to display a small notification image in the corner of the screen and have the image fade out. I'd like to do it from the command line for use with bash scripts. Similar to "notify-send", "zenity", or "dialog" except
it displays images as well.
What I've found so far:
ImageMagi...
I'm on Ubuntu Linux 10.04. I use vim for most of my development and CodeBlocks for debugging. When I first moved from Windows to Linux, I noticed that vim was showing ^Ms for newlines, and found out that this was a Microsoft thing. However, even after removing them I notice that they sometimes reappear in files (files that I edit in Code...
I am working with a class that wraps the std::wstring, this code needs to be cross platform, are there equivalents to the windows functions: MultiByteToWideChar & WideCharToMultiByte on linux?
Thank you.
...
i'm looking for an alternative to wyd 0.2 that can extract strings from any type of file it comes across.
thanks =)
...