Jun 16

Some times, while scripting, you need to print a sequence of letters or numbers. Don’t write it yourself ! Bash it using seq or curly braces!

Some examples:

#seq 1 3

1
2
3

# seq -s : 1 10
1:2:3:4:5:6:7:8:9:10

# seq -s : 0 2 10
0:2:4:6:8:10

#echo {1..10}

1 2 3 4 5 6 7 8 9 10

# echo {a..z}
a b c d e f g h i j k l m n o p q r s t u v w x y z

Building some hash directories :

# mkdir -p test/{1..5}/{1..5}

 

written by MG \\ tags: ,


Leave a Reply

*