Some Junk contents.

Hai Masters,

When i m trying to do comparing some 600 files of filename and size from server 1 with same from server 2.

Server1:
You when i m trying to do the following cmd.
ls -lrt | awk '{ print $5,$9}' >arr.sql.
This will print the filename & size of all the files in to file named "arr.sql"

What the problem is..

When i am trying to view the arr.sql, it seems like
3047 ^[[00mupgrade_9_1_0_to_9_2_0_ccex.sql^[[00m
12288 ^[[01;34mprocesses^[[00m
12288 ^[[01;34munix920b01^[[00m
4096 ^[[01;34mCVS^[[00m
108 0 ^[[00marr.sql^[[00m

But at the same time, the o/p of following cmd seems like
cat arr.sql
3047 upgrade_9_1_0_to_9_2_0_ccex.sql
12288 processes
12288 unix920b01
4096 CVS
108 arr.sql
Wt abt the some junk contents..Why bcz this pbm happens
Could anyone suggest some ideas on this.
Your help would much appreciate!!

If you are viewing the file in vi, ^[ is a representation of the character escape (ESC, 0x1b) and ESC[01;34 is a terminal command to change the color.

You have an ls command that is doing colored output.
When ls is piped like ls -lrt | awk it should not use colors.

Hai colemar.

Thank you dear..
Yes, Ur suggession is really solves my problem..
Do well..