I have a file which has the following content:
BWA='/software/bwa/bwa-0.7.12/bwa'
SAMTOOLS='/software/samtools/samtools-1.3.1/samtools'
The above tools are on my computer:
- which bwa => /work/waterhouse_team/miniconda2/envs/arima/bin/bwa and
pwd
/hic-fq => /scratch/waterhouse_team/benth/dbg2olc-40x/hic-fq
Next, I used those two sed
commands:
sed -i.bak 's|/software/bwa/bwa-0.7.12/bwa|$(which bwa)|g' mapping_arima.sh
sed -i.bak 's|/software/samtools/samtools-1.3.1/samtools|$(which samtools)|g' mapping_arima.sh
Unfortunately, as output I received:
BWA='$(which bwa)'
IN_DIR='$(`pwd`)/hic-fq'
How do I have to change the sed
commands to get:
- BWA='/work/waterhouse_team/miniconda2/envs/arima/bin/bwa' and
- IN_DIR=/scratch/waterhouse_team/benth/dbg2olc-40x/hic-fq
Thank you in advance
BWA='/work/waterhouse_team/miniconda2/envs/arima/bin/bwa'
andIN_DIR=/scratch/waterhouse_team/benth/dbg2olc-40x/hic-fq
– user977828 Oct 01 '18 at 23:28