This is a test version of Biostars. For the public version, visit https://www.biostars.org.
shell command to the following question

Hello everyone

I have small problem in running shell command. Currently I am trying to retrieve file from the folders using for-loop. Here is input folder name

TC1-T1
TC1-T2
TC1-T3
TC1-T4
TC1-T5
TC1-T6
TC1-T7
TC1-T8
TC1-T9
TC1-T10
TC2-T1
TC2-T2
TC2-T3
TC2-T4
TC2-T5
TC2-T6
TC2-T7
TC2-T8
TC2-T9
TC2-T10

I want the output as

TC1-T2
TC1-T4
TC1-T6
TC1-T8
TC2-T2
TC2-T4
TC2-T6
TC2-T8
TC2-T10

I tried to use the following code but it did not work.

  for pair in "TC"{1..2} -"T"{1..10}; do for i in $pair; do printf ${i+1} printf "\n" done done
linux offtopic

This post does not fit the theme of this forum - how is this related to bioinformatics?

1 answer

Your question is rather ill-defined. ls TC*-T*[02468]* technically does what you're looking to do?

Log in to answer this question.