• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to concatenate strings obtained from a .txt document with BASH script?

Resolved: How to concatenate strings obtained from a .txt document with BASH script?

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I have a txt document that contains a series of arguments that I want to pass to a script. Each argument is on a separate line. I want to make a BASH script that can concatenate these arguments (with white space between each one) and then execute the script with these concatenated arguments. This is the document (d.txt) content:
-format fastq
-in data/test_data.1.fq.gz
-in2 data/test_data.2.fq.gz
-reference hg19
-alignment
-variantcalling
-annotation
-iobio
-out outdir/
-BED
I have tried to do it in the following way but it gives me an error. Instead of concatenating the s
trings, it interprets them as commands. does anybody know how I can fix it?
`
instead of

If you have better answer, please add a comment about this, thank you!

bash concatenation linux script
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Why doesn’t stringstream consume output during hex formatting?

24/03/2023

Resolved: CMake path for python3 libraries doesn’t change (windows 10)

24/03/2023

Resolved: GLMM with quasi-Poisson distribution

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.