Thursday, October 24, 2013

Text Processing Linux Commands

Pattern

A Pattern is an expression that describes a set of   strings which is used to give a concise description  of a set, without having to list all elements.

eg.  ab*cd matches anything that starts with ab and ends with cd etc.

 ls *.txt – prints all text files


Text Processing


• cat – 
concatenate files and print on the standard output


Usage:

cat [OPTION] [FILE]... 


eg. cat file1.txt file2.txt 

      cat -­n file1.txt 


• echo – display a line of text   

 

Usage: echo [OPTION] [string] ... 


eg. echo I love India








No comments:

Post a Comment