tags:

views:

43

answers:

2

hi

I have the following file Need to print everything except $1 and $2 by awk

File:

INFORMATION DATA 12 33 55 33 66 43

INFORMATION DATA 45 76 44 66 77 33

INFORMATION DATA 77 83 56 77 88 22 . .

.

the desirable file

12 33 55 33 66 43

45 76 44 66 77 33

77 83 56 77 88 22 . . .

+1  A: 
$ cat t
INFORMATION DATA 12 33 55 33 66 43
INFORMATION DATA 45 76 44 66 77 33
INFORMATION DATA 77 83 56 77 88 22

$ awk '{for (i = 3; i <= NF; i++) printf $i " "; print ""}' t 
12 33 55 33 66 43 
45 76 44 66 77 33 
77 83 56 77 88 22 
danben
+1  A: 

Well, given your data, cut should be sufficient:

cut -d\  -f3- infile
radoulov