In bash you can generate letter sequence easily as "{a..z}", for example
$ 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
How to do that in the fish shell instead?
In bash you can generate letter sequence easily as "{a..z}", for example
$ 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
How to do that in the fish shell instead?
Linux has the
seq
command for this, and it works with fishshell:Fish doesn't support ranges in brace expansion, only comma-separated values:
{a,b,c}
.Thus, we are forced to search for a command capable of generating such sequence. For example, you can use Perl:
where
$,
is the output field separator.Output
You may find this table useful.
One way is to use printf and seq.
This works by generating "\x61 \x62 \x63 ... \x7a" which is then interpreted by "echo -e" as hex character codes.