Sample Header Ad - 728x90

How to display numbers in reverse order using seq(1)?

54 votes
8 answers
47696 views
I have iterate over numbers in various order. I am able to display them in increasing order, even with steps like: $ seq --separator="," 1 10 1,2,3,4,5,6,7,8,9,10 $ seq --separator="," 1 2 10 1,3,5,7,9 I am also able to display them in reverse order, neither continuous nor step wise. $ seq --separator="," 10 1 $ seq --separator="," 10 2 1 No output for above commands. My shell details: $ bash --version GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. Let me know how I would be able to display the numbers in descending order?
Asked by mtk (28478 rep)
Feb 15, 2013, 09:47 AM
Last activity: Dec 2, 2022, 12:54 PM