Debian is an operating system which includes software packages released as open source software for free, mainly under the GNU General Public License but also with other free software licenses. It runs a popular Linux distribution having access to repositories including software packages which are ready for use. In this article you will learn how to process texts using Debian. We assume that you already know how to create simple text documents using an editor, such as v1, for example. Let’s go, then.

What does text processing means?

It allows you to write the content of a file as an ASCII text using some additional commands in order to describe better your document structure. By starting the text processor you will be able to convert the source text to a file with a layout. This file can include some tables, formulas or figures, for example. At this moment some of the most used and known text processors for Debian are LaTeX and TeX.

LaTeX is a strong macro package used for TeX typesetting system. There are some text processing tools used by most users which make this by piping text through chains. When no regular expression is used you can concatenate files and output the resulted content using the cat(1) command or, in the other direction you can use tac(1) to output a reversed content. Use cut(1) to select parts of lines, sort(1) in order to sort lines from content or tr(1) if you want to delete characters or translate content.

On the other hand you are able, using some basic regular expressions (BRE), to match some text with some patterns – using grep(1) – or to power a screen editor using the command vim(1). Other extended regular expressions (ERE) will make possible for you to do simple text processing by using egrep(1).

If you are not familiar with these commands you can figure this out very easily using the command man command’. Below you can find a list with useful commands for standard text processing on Debian:

  • When no regular expression is used: cat(1), tac(1), diff(1), tr(1), cut(1), head(1), uniq(1), tail(1), sort(1)
  • When basic regular expressions are used: grep(1), emacs(1), ed(1), vim(1), sed(1)
  • When extended regular expressions are used: egrep(1), python(1), awk(1), pcregrep(1), tcl(3tcl), perl(1)

You can use regular expressions for many tools for text processing. Think about them as shell globs but obviously more complex and powerful. These expressions are formed by meta characters and text characters and they describe usually matching patterns. The meta characters are just simple characters having special meanings. Replacement expressions are some characters having also special meanings.

This was only an introduction article in this area, this overview being only the beginning for what is about to come. We hope that these tips regarding text processing in Debian operating system will help you make an idea about how this works and future documentation will be always available on in order to help you move on with your needs. Continue Reading…

Vim explicit command list

Valic —  January 11, 2011 — 1 Comment

Vim is an advanced text editor that seeks to provide the power of the de-facto Unix editor ‘Vi’, with a more complete feature set. It’s useful whether you’re already using vi or using a different editor.

Users of Vim 5 and 6 should consider upgrading to Vim 7.

Cursor movement

  • h – move left
  • j - move down
  • k – move up
  • l – move right
  • w – jump by start of words (punctuation considered words)
  • W – jump by words (spaces separate words)
  • e - jump to end of words (punctuation considered words)
  • E – jump to end of words (no punctuation)
  • b – jump backward by words (punctuation considered words)
  • B – jump backward by words (no punctuation)
  • 0 - (zero) start of line
  • ^ – first non-blank character of line
  • $ - end of line
  • G - Go To command (prefix with number – 5G goes to line 5)

Note: Prefix a cursor movement command with a number to repeat it. For example, 4j moves down 4 lines.

Continue Reading…

Vim 7.3 Released

Valic —  August 17, 2010 — Leave a comment

After a 2 year wait Vim 7.3 has finally arrived, It includes an awful lot of bug fixes and a few new features, and it’s better than ever before.

This is a minor release of Vim.  It consists of Vim 7.2 plus all patches, updated runtime files and some additions.  It has been two years since the 7.2 release, thus it’s not that “minor”.  But not ”major” either.  Something in between.

The most notable additions since 7.2:

- Persistent undo and undo for reload

- Blowfish encryption, encryption of the swap file

- Conceal text

- Lua interface

- Python 3 interface

Vim 7.3 can be obtained from the Vim download page.

Continue Reading…

Page 1 of 11