Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    46

    Unanswered: files and their types.

    Hi,

    is there any direct command to verify whether a file is fixed length file ?

    i can do calc on number of records,length of each record to find whether file is fixed width.


    Thanks
    Mark.

  2. #2
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    What's wrong with rolling your own command?

  3. #3
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Quote Originally Posted by markjason
    Hi,

    is there any direct command to verify whether a file is fixed length file ?

    i can do calc on number of records,length of each record to find whether file is fixed width.

    Thanks
    Mark.
    No, if the file contains the ascii character 10 (LF), Unix considers that and end-of-record.

    For text files, if all records are same size and end in LF you could assume the file is fixed length; for those files with different record sizes that also end in LF, you could assume variable length.

    Otherwise for binary files with/without LF characters you cannot know if it's fixed or variable length and cannot not know the length of the records unless someone tells you how it was created.



    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •