I need help in bash script:
Let's say I have a bash.sh
file such as:
cat
$1Viral_sequences_loci/Fasta_viral_loci_seq_* > $1Viral_sequences_loci/All_fasta_viral_loci.fna
and I run bash bash.sh /path1/path2/path3/
so I would replace $1
by /path1/path2/path3/
:
cat
/path1/path2/path3/Viral_sequences_loci/Fasta_viral_loci_seq_* > /path1/path2/path3/Viral_sequences_loci/All_fasta_viral_loci.fna
but what if I want to reduce only from one order in the path for instance:
cat
/path1/path2/path3/Viral_sequences_loci/Fasta_viral_loci_seq_* > /path1/path2/Viral_sequences_loci/All_fasta_viral_loci.fna
where the second $1
is not /path1/path2/path3/
but /path1/path2/