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

197
Views
¿Cómo puedo reemplazar variables dentro de comillas en paralelo?

Quiero ejecutar en paralelo un comando que ingrese dos variables en un archivo gnuplot, probé con:

 parallel 'OMP_NUM_THREADS=11 gnuplot -e 'alpha={}; file="{}.txt"' graf_separation_time.gp' ::: 0 1 2 3 4 5 6 7 8 9 10

Pero no funciona, alguna sugerencia?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Estás siendo golpeado usando 'dentro'. Citar es difícil de acertar, por lo que a menudo es más fácil definir una función, probarla y luego hacer que GNU Parallel la llame.

No probado:

 gp() { OMP_NUM_THREADS=11 gnuplot -e 'alpha='"$1"'; file="'"$1"'.txt" graf_separation_time.gp' } export -f gp parallel gp {} ::: 0 1 2 3 4 5 6 7 8 9 10

Esto probablemente también funcionará:

 parallel -q OMP_NUM_THREADS=11 gnuplot -e 'alpha={}; file="{}.txt" graf_separation_time.gp' ::: 0 1 2 3 4 5 6 7 8 9 10

Leer más: https://www.gnu.org/software/parallel/man.html#quoting

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!