background preloader

Text Utilities (Bourne Shell Compatible)

Facebook Twitter

Base64. This article is about the content encoding scheme.

Base64

For the positional numerical format, see Binary number. Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding. Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with textual data.

This is to ensure that the data remains intact without modification during transport. Design[edit] The particular choice of character set selected for the 64 characters required for the base varies between implementations. Examples[edit] Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short.

Bash Text Processing Scripts that I Wrote

Comparison & diff Tools - linux/unix. Cut (bash/Unix/linux) File text utilities. Text Editors. Expand (Unix) For example: $ echo -e "foo\tbar" | expand | xxd -g 1 -u 0000000: 66 6F 6F 20 20 20 20 20 62 61 72 0A foo bar. $ echo -e "foo\tbar" | xxd -g 1 -u 0000000: 66 6F 6F 09 62 61 72 0A foo.bar. $ expand: convert tabs to spaces – Commands & Utilities Reference, The Single UNIX® Specification, Issue 7 from The Open Group[1] The program's manpage.

Expand (Unix)

Fmt. Example[edit] Given text like this as input: Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

fmt

Curabitur dignissim venenatis pede. Quisque dui dui, ultricies ut, facilisis non, pulvinar non, purus. Duis quis arcu a purus volutpat iaculis. After passing this through fmt -w 50, the width of each line is at most 50 characters and the text flows within this constraint: Head (Unix) Head [options] <file_name> By default, head will print the first 10 lines of its input to the standard output.

head (Unix)

The number of lines printed may be changed with a command line option. The following example shows the first 20 lines of filename: Ex (text editor) Ex, short for EXtended, is a line editor for Unix systems originally written by Bill Joy[1] in 1976, beginning with an earlier program written by Charles Haley.[2] The core ex commands which relate to search and replace are essential to vi.

ex (text editor)

For instance, the ex command issued from vi :%s/XXX/YYY/g replaces every instance of XXX with YYY. The % means every line in the file. The 'g' stands for global and means replace every instance on every line (if it was not specified, then only the first instance on each line would be replaced). ex has a synonym e in HP-UX environments. ex recognises the following switches: - (obsolete) suppresses user-interactive feedback-s (XPG4 only) suppresses user-interactive feedback-l sets lisp editor option-r recover specified files after a system crash-R sets readonly-t tag Edit the file containing the specified tag-v invoke visual mode (vi)-w set window size n-x set encryption mode-C encryption optionfile specifies file to be edited List of Unix programs.

DB like stuff

Printing. Linux Patterns Matching & Regular Expressions (Text Utilities) Checksums (Bourne Shell Compatible) Formatting Output (linux/unix) Output display control (Shell) String Splitting. String Replacement. Ptx (Unix) Shuf. Shuf is a command-line utility included in the textutils package of GNU Core Utilities for creating a standard output consisting of random permutations of the input:

Shuf

Reading files. Sorting (e.g. sort & tsort) - linux/unix. Text Processing (Bash) Text (shell programming) String replacement (e.g. tr) - linux/unix. Unexpand. For example: $ echo " asdf sdf" | unexpand | od -c 0000000 \t \t a s d f s d f \n 0000014 $ echo " asdf sdf" | od -c 0000000 0000020 a s d f s d f \n 0000032 See also[edit] External links[edit] [1] The program's manpage.

Unexpand

Unexpand. Text Editors. File & Text Utilities (Linux) Basic Commands (Bourne shell compatible) Linux/unix (Bourne shell compatible) Shells (Unix & Linux)