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 8632541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:22:02+00:00 2026-06-12T09:22:02+00:00

I am trying to open multiple files in vim from the command line with

  • 0

I am trying to open multiple files in vim from the command line with this command. For some reason I am getting an erro as you will see below.

 $ find . -name edit.html.erb  \
     | perl -pi -e 's/^..//'   \
     | perl -pi -e 's/\n$/ /'  \
     | vim

When I run it without “| vim” as in this command:

 $ find . -name edit.html.erb  \
     | perl -pi -e 's/^..//'   \
     | perl -pi -e 's/\n$/ /'

And get this output:

 addresses/edit.html.erb claims/edit.html.erb emails/edit.html.erb owners/edit.html.erb packages/edit.html.erb users/edit.html.erb vessels/edit.html.erb voyages/edit.html.erb %

I get an error that probably has something to do with that “%” mark at the end of the output.

Here is the output and error:

 Vim: Warning: Input is not from a terminal
 Vim: Error reading input, exiting...
 Vim: preserving files...
 Vim: Finished.

How can I fix this? Not sure which of the parts is causing the error since I’m a newb, but any help would be appreciated!

  • 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-12T09:22:03+00:00Added an answer on June 12, 2026 at 9:22 am

    You are passing the contents of the files as keyboard input. I presume what you want to do is launch vim with the files open. I don’t know vim, but that’s usually achieved by passing the file names as arguments.

    In bash, one would use:

    vim $( find . -name edit.html.erb | perl -pe's/^..//' | perl -pe's/\n$/ /' )
    

    (Removed the nonsense use of -i.)

    Actually, changing the newlines to spaces is useless, and so is removing the leading ./, so all you need is:

    vim $( find . -name edit.html.erb )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to open a multifile dialog that can select multiple files from
I'm trying to open a file for input in Excel with this line :
I'm trying to open multiple files at once with the OpenFileDialog , using FileNames
I am trying to ftp multiple files from one machine to another using a
When launching vim from the command line, I can do for example vim *.txt
I'm trying to open multiple files simultaneously (random number of files) and store their
I'm trying to download multiple files in a zip archive using PHP/codeigniter.This code works
I'm trying to read in multiple files using MPI-IO in C. I'm following this
I'm trying to open a JSON file from the assets folder with an InputStream
I'm trying to open a file and read from the last point read. My

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.