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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:43:01+00:00 2026-06-14T08:43:01+00:00

I used the bash commands to append several lines to multiple configuration files: >

  • 0

I used the bash commands to append several lines to multiple configuration files:

> for filename in *.ovpn; do
> printf 'configurationscript-security 2\nup /etc/openvpn/update-resolv-conf\ndown /etc/openvpn/update-resolv-conf' >> $filename; 
> done

However the control character “^M” appeared at end of each line in the configuration file:
enter image description here

I opened the files in vim, the files before bash commands looked like as folows:
enter image description here

I am curious why “^M” appears at end of each line? 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-14T08:43:02+00:00Added an answer on June 14, 2026 at 8:43 am

    It is Windows’ carriage return, use dos2unix to convert file. Vim recognize the file format and displays it correctly.

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

Sidebar

Related Questions

I had used several ways to do some simple integer arithmetic in BASH (3.2).
I have a Postgres purging script in bash where I used to run multiple
In oracle database, command host can be used to run bash command from database
Setup: Bash Ruby 1.9.2 highline (1.6.13) Description: I'm fairly used to highline with some
Is it the end of option I am used to see in bash (and
In bash, some commands put their stdout BEFORE the command prompt and on the
Basically I want to print the 10 most used commands that are stored in
I had a bash file which prompted the user for some parameters and used
How can I see, for example, what are my most used commands in the
Question: Can inotify be used to reliably record files in a [linux] system? Details:

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.