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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:11:00+00:00 2026-06-04T03:11:00+00:00

i have shell script written in RedHat OS. I need to run this script

  • 0

i have shell script written in RedHat OS. I need to run this script in windows environemtn.

So i used cygwin to run the script on windows.

But when i run the script using

sh housekeeper.sh 

it gives me following error which is not retured in RedHat OS

line 12: $'\r': command not found

but line number 12 of my script is empty

  08  #
  09  ######################################################################
  10  #### PARAMETERS TO SET BEGIN
  11  ######################################################################
  12  
  13  # archive setttings
  14  ARCHIVE_USER=abc                      # archive storage user name  (default)
  15  ARCHIVE_GROUP=app                     # archive storage user group (default)
  16  ARCHIVE_PATH=/test/file               # archive storage directory (default)
  17  ARCHIVE_DELAY=+8

could anybody tell me whats wrong with the script here or cygwin here.

thanks in advance for any help

  • 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-04T03:11:01+00:00Added an answer on June 4, 2026 at 3:11 am

    Most likely cygwin sh is expecting a UNIX line separator (i.e. \n) but is instead finding a Windows line separator, \r\n, and hence is trying to execute \r as if it were a command. This could easily have happened if you edited this script in a Windows-based text editor.

    If you have the command dos2unix you could use that, or tr to remove \rs:

    tr -d '\r' < old.sh > new.sh
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written this shell script as wrapper to a JAR file. The script
I have a shell script file (run.sh) that contains the following: #!/bin/bash %JAVA_HOME%/bin/java -jar
I have one shell script opening a perl script. This perl script should be
I have a shell script, which is run under a opensuse linux, that starts
Hi I have a shell script which should run based on the return of
I have written a custom shell script function, and put in in my .profile
Can we have multiple SQL* PLUS connections in a shell script? I have written
Here's a snippet of code from a shell script I have written: for src
I have shell scripting knowledge. I have written a small shell script which will
I have a script written the unix shell language (NOT in bash or any

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.