dev.

some developers' random rants and thoughts
  • Home
  • Impressum & Legal Notice

Archive

Posts Tagged ‘ipc’

Consuming pipe Inputs in Unix

March 11th, 2010 niels No comments

You’d like your application to read pipe inputs, like “ls -la | myGreatApp”? That’s pretty easy:

#include <stdio.h>
#include <unistd.h>
 
int main(void)
{
  char input[BUFSIZ];
  /* just read it ... */
  read(STDIN_FILENO, input, BUFSIZ);
  /* ... and use it */
  puts(input);
 
  return(0);
}
Tags: ipc, linux, os x, unix
RSS
  • Google
  • Youdao
  • Xian Guo
  • Zhua Xia
  • My Yahoo!
  • newsgator
  • Bloglines
  • iNezha

Random Posts

  • JDK 7 Summarized
  • HtmlUnit 2.5 Released
  • Design Patterns With Java and UML 2 Made Simple
  • Access Hotmail/Windows Live Mail via POP3
  • How To Restore A SQL Server Database via SQLCMD

Tag Cloud

10.6 android checksum coding command line dep firefox gdb git i18n ie8 ipc java kde kubuntu linux linux kubuntu ubuntu mac md5 netbook os x pattern portable python qotd sockets sql subversion ubuntu unix win32 windows

Categories

  • development
  • helpdesk
  • life out there
  • note to self
  • shell
  • Uncategorized

Blogroll

  • Ars Technica
  • Deutscher Fußball Blog
  • entwickler.de
  • gHacks Technology News
  • Lifehacker
  • SlashDot.org
  • The ServerSide
  • Unix Toolbox
  • Wired News
  • youngvisions.net – Kim Schneiders Blog

Archives

  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008

Meta

  • Log in
Top WordPress
Copyright © 2008-2010 dev.
Theme by NeoEase. Valid XHTML 1.1 and CSS 3.