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

  • Home
  • SEARCH
  • 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 9275573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:37:13+00:00 2026-06-18T16:37:13+00:00

I am running the IBAMR model (a set of codes for solving immersed boundary

  • 0

I am running the IBAMR model (a set of codes for solving immersed boundary problems) on x86_64 GNU/Linux.
The startup configuration file is called input2d.
When I open it with vi, I find:

“input2d” [noeol][dos] 251L, 11689C

If I compile the IBAMR model without saving input2d, it compiles and runs fine.
However, if I save input2d, the compiler crashes, saying:

Warning in input2d at line 251 column 5 : Illegal character token in input

Clearly this has something to do with unix adding a newline to the end of the file.
Here’s my question:
How do I save this file in dos format AND without a trailing newline in vi on a unix system?

  • 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-18T16:37:15+00:00Added an answer on June 18, 2026 at 4:37 pm

    Use vim -b <file> or :set binary to tell vim not to append an newline at the end of the file. From :help binary:

    When writing a file the <EOL> for the last line is only written if
    there was one in the original file (normally Vim appends an <EOL> to
    the last line if there is none; this would make the file longer). See
    the ‘endofline’ option.

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

Sidebar

Related Questions

Running in Debug and pressing F8 to continue will get this 'Class File Editor
Running an IIS7 server, I can't figure out how to set up a static
Running this code creates file2.txt as expected, but the file is empty. (Note: file1.txt
Running a module called log.py creates a file my_file.log where it logs at what
Running Bison on this file: %{ #include <iostream> int yylex(); void yyerror(const char*); %}
Running a Java Swing program on Ubuntu Linux, I'm getting an odd bug where
Running this command in the mongodb installation file from mongodb.org ./mongo ds045907.mongolab.com:45907/database -u user
Running rvmsudo passenger-install-nginx-module , I get: Checking for required software... * GNU C++ compiler...
Running into problems creating objects through reflection and then running them on multiple threads.
Running the debugger in Xcode when you set a breakpoint you get a view

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.