|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Record count in Unix servers
Hi All,
when i ftp the file from windows machine to unix server the record count in the file is decreased by 1. example: Say a text file has three lines in it and when you place this file in unix server from your local machine and run a below command cat filename | wc -l the output is showing as 2 but when you create a same file and same lines in unix machine directly it will show record count a 3 Any idea why it so? ---------- Post updated at 07:23 PM ---------- Previous update was at 07:23 PM ---------- Record count of windows file in unix server |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
UNIX does not like windows carriage control bytes - ascii 10 and ascii 13. UNIX carriage control for text files is just a single ascii 10. Called a newline character.
If you want things to work the way you expect all windows files moved to UNIX have to be run through the dos2unix (sometimes called dos2ux) command. |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
... or do the ftp in ASCII mode (not BINARY mode).
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Validate record count | balaji23_d | Shell Programming and Scripting | 6 | 12-01-2009 08:59 AM |
| replaying a record count with another record count | er_zeeshan05 | Shell Programming and Scripting | 2 | 10-30-2008 12:14 AM |
| Record count of a csv file | ajaykk | Shell Programming and Scripting | 5 | 07-17-2008 05:16 PM |
| record count | dr46014 | Shell Programming and Scripting | 4 | 12-11-2007 03:39 PM |
| How to count the record count in an EBCDIC file. | oracle8 | UNIX for Dummies Questions & Answers | 1 | 07-26-2006 07:22 PM |
|
|