The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: AWK scripting
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 11-26-2008
Tytalus's Avatar
Tytalus Tytalus is offline Forum Advisor  
echo {1..9}^2\;|bc
  
 

Join Date: Jun 2003
Location: Scotland
Posts: 431
or in nawk:

Code:
# nawk 'NR%3 {printf "%s ", $0;next}1(NR+1)%3{print"\n"}' infile
     The first line. Second line.

First line of the second paragraph. Second line of the second paragraph.