Matthew Ennis
New Member
Hey,
I'm very new to using CLI and bash scripts (and programming in general) so excuse me if this is bare bones.
Basically the problem I'm having is I have a bash script which needs to make a new directory named as a concatenation of the names of two files that have been passed to the script. I need this to be done using dynamic variables, '$1' and '$2' etc etc..
Something like this:
COMMAND:
bash script.sh one.txt two.txt
CONTENTS OF SCRIPT.SH:
mkdir 'concat_<I don't know what to put it in here to get one.txt and two.txt>'
So the desired directory name is concat_one.txt_two.txt
This is going to be done many times as I'm using this script with a DSL called Nextflow which will read in more files in parallel (three.txt, four.txt etc etc etc..)
Any help and guidance would be much appreciated!
I'm very new to using CLI and bash scripts (and programming in general) so excuse me if this is bare bones.
Basically the problem I'm having is I have a bash script which needs to make a new directory named as a concatenation of the names of two files that have been passed to the script. I need this to be done using dynamic variables, '$1' and '$2' etc etc..
Something like this:
COMMAND:
bash script.sh one.txt two.txt
CONTENTS OF SCRIPT.SH:
mkdir 'concat_<I don't know what to put it in here to get one.txt and two.txt>'
So the desired directory name is concat_one.txt_two.txt
This is going to be done many times as I'm using this script with a DSL called Nextflow which will read in more files in parallel (three.txt, four.txt etc etc etc..)
Any help and guidance would be much appreciated!