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

226
Views
I want to read an array (js variable) from bash

I have a task to treat data with an algorithm using bash something like that :


array.json {array1:[1,0,2];array2:[0,3,4]}

shell.exec('./algorithm "$(cat array.json)" 1.0')

Results

{array1:[1,1,2];array2:[1,3,4]}


I did that and I stored it in database for my second task is doing the same with hosting data, I stored data in variable called studiedArray I tired to do something like that but it doesn't work even when change cat with echo :


studiedArray {array1:[1,1,2];array2:[1,3,4]}

shell.exec(`./algorithm "$(cat ${studiedArray})" 1.0`)

I used shelljs

about 4 years ago · Juan Pablo Isaza
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!