So as an input, i get echo [number]
. For example: echo 5
.
I need to get as output the sequence of numbers from 1 to [number].
So if I get 5 as input, I need: 1 2 3 4 5 (all on a separate line).
I know I can use seq 5
to get 1 2 3 4 5 but the issue is that I need to use pipes.
So the final command should be like this: echo 5 | seq [number]
which should give 1 2 3 4 5 as output. My issue is that I don't know how to get the output from echo
as my input for seq
.