Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

291
Views
Makefile removes argument post white space value when called from bash script

I've written a small bash script to invoke a make command.
The makefile expects args='<arguments to be passed to program>' argument. (i.e. make a args='--aaa 5 --bbb 6')
The problem is when I use the script to invoke the make command, the argument is truncated on its first white space.
For example, when executing make a args='--aaa 5' through the script, the args variable is '--aaa and not '--aaa 5'
I've also tried adding quotes and single quotes but the result is the same.
When I invoke the make command manually through terminal the, the args variable gets all the arguments and their values as expected.

Here is the script call :

args="args='--aaa 5 --bbb 6'"
make a ${args}
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You have to double-quote $args to preserve the whitespace.

make a "$args"

I'm assuming the Makefile correctly handles the value once it receives it.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!