basename: extra operand error
I want to use an array for fastq files:-
RUN=${SLURM_ARRAY_TASK_ID}
R1=$(head -n $RUN input.txt | tail -n 1)
data=$(basename $R1 | cut -f 1 -d'_')
Where, input.txt:
GC-1 9 27
GC-2 7 79
GC-3 2 53
GC-4 6 32
I am getting an error $data: basename: extra operand '27'
I am not sure where is the error. Thank you!
• 2,499 views
•
link
0 answers
No answers yet.
Log in to answer this question.
the message is clear. there is more tokens than
basenamewants in the output ofhead -n $RUN input.txt | tail -n 1Have you looked on StackExchange? Pure unix questions like this can often be answered by checking around there.
Hello evelyn!
We believe that this post does not fit the main topic of this site.
what genomax said. Not related to bioinformatics.
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!