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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:40:27+00:00 2026-06-03T11:40:27+00:00

I want to build a shell script to execute the following two commands, but

  • 0

I want to build a shell script to execute the following two commands, but the shell complains that it does not know about the parameters clean or reload.

    make -f '/home/ec2-user/infx/infx.mak' clean
    make -f '/home/ec2-user/infx/infx.mak' reload > '/home/ec2-user/infx/mylog.txt' 2>&1

I would like to make a variable out of the directory as well, but when trying to concat the directory and infx.mak I am having even more issues.

Thanks for your help

Code and Errors:

    echo "Cleaning Project"
    make -f '/home/ec2-user/infx/infx.mak' clean
    echo "Making Project"
    make -f '/home/ec2-user/infx/infx.mak' reload > '/home/ec2-user/infx/mylog.txt' 2>&1
    srcdir='/home/ec2-user/infx'
    srcmak='/infx.mak'
    echo "$srcmak$srcdir"
    exit 0

    [ec2-user@ip infx]$ sudo ./reload.sh
    '.  Stop. No rule to make target `clean
    : ambiguous redirect 1
    /home/ec2-user/infx
  • 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-03T11:40:29+00:00Added an answer on June 3, 2026 at 11:40 am

    The error message looks like you have DOS line endings in your script. Try dos2unix or tr -d '\015' to fix it. (Google for a bit if you need help; this is a very common problem.)

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

Sidebar

Related Questions

I want to build a bot that basically does the following: Listens to the
Not until midway through a 3 hour build script, I'll remember that I want
We want to build a script that run every night (kills and restart a
I want build a sketch pad app on iPhone, I assume that this type
I want to build a website that uses Flex/Flash as the GUI, and Java
I want to build a survey which has about 20 questions. All questions are
I need this cron job to execute my shell just as it does when
I have various shell build scripts for a project and want to create one
I have a simple shell script that builds my Roxygen documents, builds the package,
Is there a standalone tool, that can be ran from a shell script, to

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.