Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7716047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:32:20+00:00 2026-06-01T02:32:20+00:00

So I have a strange question. I have written a script that re-formats data

  • 0

So I have a strange question. I have written a script that re-formats data files. I basically create new files with the right column order, spacing, and such. I then unix2dos these files (the program I am formatting these files for is DIPS for windows, and I assume that the files should be ansi). When I go to open the files in the DIPS Program however an error occurs and the file won’t open.

When I create the same kind of data file through the DIPS program and open it in note pad, it matches exactly with the data files I have created with my script.

On the other hand if I open the data files that I have created with my script in Kedit first, save them, and then open them in the DIPS program everything works.

My question is what could saving in Kedit possibly do that unix2dos does not?

(Also if I try using note pad or word pad to save instead of Kedit the file doesn’t open in DIPS)

Here is what was created using the diff command in unix

”
1,16c1,16
* This file is generated by Dips for Windows.
* The following 2 lines are the Title of this file.
Cobre Panama
Drill Hole B11106-GT

Number of Traverses: 0

  • Global Orientation is:
    DIP/DIPDIRECTION

    0.000000 (Declination)

    NO QUANTITY

    Number of extra columns are: 0

—
* This file is generated by Dips for Windows.
* The following 2 lines are the Title of this file.
Cobre Panama
Drill Hole B11106-GT

Number of Traverses: 0

  • Global Orientation is:
    DIP/DIPDIRECTION

    0.000000 (Declination)

    NO QUANTITY

    Number of extra columns are: 0

18c18

—

440c440

—

442c442

-1

-1
“

Any help would be appreciated! Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:32:22+00:00Added an answer on June 1, 2026 at 2:32 am

    Okay! Figured it out.

    Simply when you unix2dos your file you do not strip any space characters in between the last letter in a line and the line break character. When saving in Kedit you do strip the spaces between the last letter in a line and the line break character.

    In my script I had a poor programing practice in which I was writing a string like this;

    echo "This is an example string " >> outfile.txt

    The character count is 32, and if you could see the break line character (chr(10)) the line would read;

    This is an example string <chr(10)>

    If you unix2dos outfile.txt the line looks the same as above but with a different break line character. However when you place the file into Kedit and save it, now the character count is 25 and the line looks like this;

    This is an example string<chr(10)>

    This occurs because Kedit does not preserve spaces at the end of a line. It places the return or line break character at the last letter or "non space" character in a line.

    So programs that read literal input like DIPS (i’m guessing) or more widely used AutoCAD scripting will have a real problem with extra spaces before the return character. Basically in AutoCAD scripting a space in a line is treated as a return character. So if you have ten extra spaces at the end of a line it’s treated the same as ten returns instead of the one you probably intended.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right, bit of a strange question; I have been doing some linq to XML
Strange question, I know. Allow me to explain. I have a JavaScript/jQuery function that
I think that I have a quite strange question. I am using a class
I have a relatively strange question. I have a file that is 6 gigabytes
I have probem / strange question, i got algorithm with few for loops and
I have a strange question concerning subroutines: As I'm creating a minimal language and
I have a bit of a strange question. Can anyone tell me where to
I know it is a strange question did someone have had a case where
I have a very strange question. I have a class/function : class MCBSystem {
I have a rather strange question: I have a Java application which uses applications

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.