background preloader

Programming

Facebook Twitter

Learning the shell - Lesson 6: I/O Redirection. In this lesson, we will explore a powerful feature used by many command line programs called input/output redirection.

Learning the shell - Lesson 6: I/O Redirection

As we have seen, many commands such as ls print their output on the display. This does not have to be the case, however. By using some special notation we can redirect the output of many commands to files, devices, and even to the input of other commands. Standard Output Most command line programs that display their results do so by sending their results to a facility called standard output. [me@linuxbox me]$ ls > file_list.txt In this example, the ls command is executed and the results are written in a file named file_list.txt. Each time the command above is repeated, file_list.txt is overwritten (from the beginning) with the output of the command ls. [me@linuxbox me]$ ls >> file_list.txt When the results are appended, the new results are added to the end of the file, thus making the file longer each time the command is repeated.

Standard Input Pipes Filters.

WebGL

IT- Download free computer eBooks in pdf. Python. 30 free programming eBooks - citizen428.blog() Since this post got quite popular I decided to incorporate some of the excellent suggestions posted in the comments, so this list now has more than 50 books in it.

30 free programming eBooks - citizen428.blog()

BTW: I’m not very strict on the definition of “ebook”, some of them are really just HTML versions of books. [UPDATED: 2012-01-18] Learning a new programming language always is fun and there are many great books legally available for free online. Here’s a selection of 30 of them: Lisp/Scheme:Common Lisp: A Gentle Introduction to Symbolic ComputationHow to Design ProgramsInterpreting Lisp (PDF, suggested by Gary Knott)Let Over LambdaOn LispPractical Common LispProgramming in Emacs LispProgramming Languages.

Ruby:The Bastards Book of Ruby (suggested by Dan Nguyen)Clever Algorithms (suggested by Tales Arvelos)Data Structures and Algorithms with Object-Oriented Design Patterns in RubyLearn Ruby the Hard WayLearn to ProgramMacRuby: The Definitive GuideMr. Erlang:Concurrent Programming in ErlangLearn You Some Erlang for Great Good. A Beginner?s Guide to Design Patterns. Ever wondered what design patterns are?

A Beginner?s Guide to Design Patterns

In this article, I'll explain why design patterns are important, and will provide some examples, in PHP, of when and why they should be used. Design patterns are optimized, reusable solutions to the programming problems that we encounter every day. A design pattern is not a class or a library that we can simply plug into our system; it's much more than that. It is a template that has to be implemented in the correct situation. It's not language-specific either. There are three basic kinds of design patterns: structural creationalbehavioral Structural patterns generally deal with relationships between entities, making it easier for these entities to work together. Creational patterns provide instantiation mechanisms, making it easier to create objects in a way that suits the situation.

Behavioral patterns are used in communications between entities and make it easier and more flexible for these entities to communicate. Pretty simple, right?