Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

As steeldriversteeldriver answeredanswered and murumuru answered, bash has a brace expansion feature that can solve your problem:

array1=( JF-{1998..2011} )

and

array2=( {JF,RFS,JFI}-1998} )

or even all together:

array3=( JF-{1998..2011} {JF,RFS,JFI}-1998} )

As steeldriver answered and muru answered, bash has a brace expansion feature that can solve your problem:

array1=( JF-{1998..2011} )

and

array2=( {JF,RFS,JFI}-1998} )

or even all together:

array3=( JF-{1998..2011} {JF,RFS,JFI}-1998} )

As steeldriver answered and muru answered, bash has a brace expansion feature that can solve your problem:

array1=( JF-{1998..2011} )

and

array2=( {JF,RFS,JFI}-1998} )

or even all together:

array3=( JF-{1998..2011} {JF,RFS,JFI}-1998} )
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

As steeldriver answered and muru answered, bash has a brace expansion feature that can solve your problem:

array1=( JF-{1998..2011} )

and

array2=( {JF,RFS,JFI}-1998} )

or even all together:

array3=( JF-{1998..2011} {JF,RFS,JFI}-1998} )