g | x | w | all
Bytes Lang Time Link
076Tcl181128T151958Zsergiol
072AWK250304T192719Zxrs
010Husk250223T201523ZGlory2Uk
034Regenerate a220702T230945ZDeadcode
005Vyxal jM220702T151238ZnaffetS
044Julia220702T154258ZMarcMush
072Regenerate a220702T051346ZDLosc
011Burlesque200208T103954ZDeathInc
072C# Visual C# Interactive Compiler181117T133242Zdana
047Perl 5181116T202436ZXcali
008Java190417T170350ZBenjamin
113C++ gcc190417T130954ZX1M4L
012Brachylog190311T053420ZUnrelate
081C gcc181117T233837Zgastropn
028APL Dyalog Extended190311T013434Zvoidhawk
008Japt R181116T193304ZShaggy
010MathGolf181128T154909Zmaxb
131Kotlin181120T080732ZKromzem
185TSQL181116T205325ZBradC
051PHP181126T181400ZTitus
163Oracle SQL181126T171733ZDr Y Wit
025Perl 6181116T195445ZSean
064JavaScript REPL181116T230630ZShaggy
083JavaScript181120T104331ZAlvin Li
039Ruby181120T091942ZG B
026K ngn/k / K oK181117T093121Zmkst
019K4181120T074213Zmkst
052MATLAB181117T010706ZLuis Men
040PowerShell181116T193801ZAdmBorkB
036Wolfram Language Mathematica181116T195501ZKelly Lo
057Bash + GNU Core Utilities181118T021303Zmarkasof
008Jelly181116T193154ZETHprodu
007Jelly181117T170727ZJonathan
055Python 2181117T155959Zxsot
00805AB1E legacy181117T144138ZMr. Xcod
010Pyth181117T141350ZDennis
015Pyth181117T134935ZErik the
038Retina 0.8.2181117T125742ZNeil
072Common Lisp181116T195932ZRenzo
059Red181117T043206ZGalen Iv
055Haskell181116T193808Znimi
050Haskell181116T203747Zxnor
090Clean181117T013117ZΟurous
026J181116T200540ZJonah
007Jelly181116T221536ZDennis
008Stax181116T212137Zrecursiv
049R181116T192851ZGiuseppe
019Charcoal181116T205943ZNeil
056Python 2181116T200152Zxnor
041V181116T202149ZDJMcMayh
061Python 2181116T194446ZTriggern
061Python 2181116T200453ZChas Bro
063Python 2181116T194525ZDJMcMayh

Tcl, 76 bytes

puts 0
time {if {[set L [split [incr i] ""]]==[lsort -u $L]} {puts $i}} 9999

Try it online!

AWK, 72 bytes

END{for(;i++<1e4;printf j?i RS:X)for(j=k=split(i,a,X);k;)j*=a[k--]>a[k]}

Attempt This Online!

END{for(;i++<1e4;     # iterate
printf j?i RS:X)      # print if j non-zero
for(j=k=split(i,a,X); # split i into array
k;)j*=a[k--]>a[k]}    # if not > then j==0

Husk, 10 bytes

¶mdΣMṖŀ5ḣ9

Try it online!

Also: 10 bytes ¶mdṁ`Ṗḣ9ŀ5 and 11 bytes ¶fo<5LmdṖḣ9

    MṖ      -- make all subsequences, 
      ŀ5    --  having 0 to 4 elements
        ḣ9  --  of all digits 1 to 9
            -- (the result is grouped into sublists)
   Σ        -- unlist
 md         -- join digits together
¶           -- join by newlines

Regenerate -a, 36 34 bytes

0|(([2-9])$4{$1/$2}|$3![1-9]()){4}

Attempt This Online!

This was directly inspired by the language's creator's answer, but I figured this big optimization building on that idea was worth its own post.

    0              # Zero must be matched as a special case, because no other
                   # numbers have a leading '0' digit.
|
    (
        ([2-9])    # \2 = a digit intended to be greater than the previous
                   #      one ($1), but until being validated below, it can
                   #      be any digit in [2-9].
                   # We could actually do ([0-9]) here and it'd generate the
                   # same output, but would run slightly less efficiently.
        $4{$1/$2}  # Repeat a nonexistent group $1/$2 number of times. $1 and $2
                   # are the literal contents of those captures interpreted as
                   # numeric values upon which arithmetic can be done in a
                   # quantifier, which we do here. $1/$2 will evaluate to
                   # zero iff $2 is greater than $1, which is the only thing
                   # that will allow it to match, because if it repeats more
                   # than zero times, it tries to match the nonexistent group
                   # $4 which can't match.
    |
        $3         # If the above fails to match, due to $1 containing the
                   # digit '9', the regex engine will try other matches, even
                   # if they use short-circuiting alternation. So we put a
                   # dummy match here, which can only match on iterations
                   # other than the first one. Once this matches, it will be
                   # the only thing that can match in all subsequent
                   # iterations, because the attempted math "$2-$1-1" will
                   # fail still - now due to $1 no longer being a number (it
                   # will be blank).
    # Short-circuiting alternation - never try the following unless the all of
    # the above failed to match.
    !
        [1-9]      # Match the first digit. This can only happen on the first
                   # iteration, thanks to the short-circuiting alternation.
        ()         # $3 = empty capture - lets subsequent iterations know that
                   #      they are no longer the first iteration
    )              # $1 = whatever digit was matched above, for use by the next
                   #      iteration
    {4}            # Repeat the above loop for exactly 4 iterations. This
                   # allows a variable number of digits, due to the "$3" dummy
                   # alternative.

Alternative 34 bytes:

0|(([2-9])$3{$1/$2}|{#1}![1-9]){4}

Attempt This Online!

It might not be intended that this is possible, but Regenerate allows a quantifier to be preceded by nothing. This is what's happening with {#1} - it's impossible for it to match on the first iteration because $1 hasn't been captured yet and doesn't have a length. On subsequent iterations, a match of nothing gets repeated one time (the length of $1).

Vyxal jM, 5 bytes

k2'Þ⇧

Try it Online!

Flagless:

Vyxal, 7 bytes

k2ʀ~Þ⇧⁋

Try it Online!

Julia, 44 bytes

0:6^5 .|>x->issorted("$x",lt=<=)&&println(x)

\$(6^5 = 7776)\$

Attempt This Online!

Regenerate -a, 72 bytes

0|([1-9])(([2-9])(){$3-$1-1}(([3-9])(){$6-$3-1}(([4-9])(){$9-$6-1})?)?)?

Appropriately, outputs the numbers in lexicographic order. Attempt This Online!

Explanation

0|

Match 0, or:

([1-9])

Match a digit 1 through 9 (capture group 1).

(...)?

Either stop there, or continue:

([2-9])

Match a digit 2 through 9 (capture group 3), and:

(){$3-$1-1}

Match an empty group X times, where X equals the second digit minus the first digit minus 1. If the second digit is not larger than the first digit, this quantity is negative, and using a negative number as a repetition count causes the match to fail. Thus, only matches where the second digit is larger than the first digit are included.

(...)?

Either stop there, or continue:

([3-9])

Match a digit 3 through 9 (capture group 6), and:

(){$6-$3-1}

Match an empty group Y times, where Y equals the third digit minus the second digit minus 1 (ensuring that the third digit is larger than the second digit).

(...)?

Either stop there, or continue:

([4-9])

Match a digit 4 through 9 (capture group 9), and:

(){$9-$6-1}

Match an empty group Z times, where Z equals the fourth digit minus the third digit minus 1 (ensuring that the fourth digit is larger than the third digit).

Burlesque, 11 bytes

1e4qsoFO:U_

Equivalently

1e4ro:so:U_

Try it online!

1e4 # 10000
qso # Boxed is sorted?
FO  # Filter from 1..10000 if sorted
:U_ # Filter for unique digits

C# (Visual C# Interactive Compiler), 102 101 73 ... 72 bytes

-12 and -4 thanks @Dennis!

for(var i=0;i<7e3;i++)if((i+"").Aggregate((a,b)=>a<b?b:':')<58)Print(i);

Try it online!

Each integer from 0 to 7k tested by first converting it into a string. Leveraging the fact that C# treats strings as character enumerables and LINQ, an aggregate is calculated for each character enumerable as follows:

If the result of this is less than : (ASCII 58), then the number has lexicographically increasing digits.

Perl 5, 47 bytes

map{$_&&s/.(?=(.))/$1-$&/gre=~/0|-/||say}0..1E4

Try it online!

Older:

52 bytes

Java 8

Full program: 186 bytes

interface M{static void main(String[]a){for(int i=-1;i++<9999;System.out.print((i+"").chars().distinct().sorted().mapToObj(c->(c-48)+"").reduce("",(x,y)->x+y).equals(i+"")?i+"\n":""));}}

Function: 149 bytes

v->{for(int i=-1;i++<9999;System.out.print((i+"").chars().distinct().sorted().mapToObj(c->(c-48)+"").reduce("",(x,y)->x+y).equals(i+"")?i+"\n":""));}

C++ (gcc), 113 bytes

bool y(int a){return(a==0||a%10>(a/=10)%10&&y(a))?true:false;}void z(int i){while(++i<7e3)if(y(i))cout<<i<<endl;}

Try it online!

Pretty Layout:

#include<iostream>
using namespace std;

bool y(int a){
    return(a==0||a%10>(a/=10)%10&&y(a))?true:false;
}

void z(int i){
    while(++i<7e3){
        !y(i)?:cout<<i<<endl;
    }
}

int main(){
    z(-1);
}

Brachylog, 12 bytes

7jj⟦{ẹ<₁cẉ}ˢ

Try it online!

         ẉ      Write on its own line
    {     }ˢ    every
        c       concatenated
      <₁        strictly increasing
     ẹ          list of digits of
   ⟦            numbers from the range from 0 to
7jj             7777.

7jj⟦{ṫ⊆Ị&ẉ}ˢ also works.

C (gcc), 97 89 81 bytes

Thanks to ceilingcat for -8 bytes.

Another -8 thanks to Dennis

g(n){n=!n||n/10%10<n%10&&g(n/10);}f(i){for(i=-1;++i<7e3;g(i)&&printf("%u\n",i));}

Try it online!

APL (Dyalog Extended), 28 bytes

{(⍵≡∪⍵)∧⍵≡∧⍵:⎕←⍵⋄⍬}∘⍕¨⍳10000

Try it online!

Explanation:

{(⍵≡∪⍵)∧⍵≡∧⍵:⎕←⍵⋄⍬}∘⍕¨⍳10000 ⍝ Full program
                          ⍳10000 ⍝ Generate integers from 1 to 10000
                      ∘⍕¨       ⍝ For each number, convert to string and apply left function
         ⍵≡∧⍵                   ⍝ If the string equals itself sorted...
 (⍵≡∪⍵)∧                        ⍝ ...and the string contains only unique elements...
               ⎕←⍵              ⍝ ...print the string to output with trailing newline
                   ⋄⍬            ⍝ Otherwise, do nothing

Japt -R, 12 11 8 bytes

L²Ç¶ìüÃð

Test it

L            :100
 ²           :Squared
  Ç          :Map the range [0,L²)
    ì        :  Split to a digit array
     ü       :  For the sake of simplicity*, let's say: Sort & deduplicate
             :  Implicitly rejoin to an integer
   ¶         :  Test for equality with original number
      Ã      :End map
       ð     :Get 0-based indices of truthy elements
             :Implicitly join with newlines and output

*Or, to offer a better explanation: the ü method sorts an array and splits it into equal elements (e.g., [8,4,8,4].ü() -> [[4,4],[8,8]]) and then, in what seems to be a strange quirk and hopefully not a bug, the ì method, when converting the array back to a number, takes the first element of each nested array, rather than first flattening the array, which is what I expected when I tried this trick (e.g., [[4,4],[8,8]].ì() -> 48).

MathGolf, 10 bytes

♫rgÆ▒_s▀=n

Try it online!

Explanation

♫            push 10000
 r           range(0, n)
  g          pop a, (b), pop operator from code, filter
   Æ         start block of length 5
    ▒        split to list of chars/digits
     _       duplicate TOS
      s      sort(array)
       ▀     unique elements of string/list
        =    pop(a, b), push(a==b)
         n   newline char, or map array with newlines

Kotlin, 132 131 bytes

Edit: -1 Byte thanks to @Giuseppe

fun main(){(0..9999).forEach{it.toString().let{var b=1;it.forEachIndexed{i,c->if(i>0&&it[i-1]<c)b++};if(b==it.length)println(it)}}}

Try it online!

T-SQL, 188 185 bytes

WITH a AS(SELECT 0n UNION ALL SELECT n+1FROM a WHERE n<9)
SELECT CONCAT(a.n,b.n,c.n,d.n)+0
FROM a,a b,a c,a d
WHERE(a.n<b.n OR a.n+b.n=0)
AND(b.n<c.n OR b.n+c.n=0)
AND(c.n<d.n OR c.n+d.n=0)

Line breaks are for readability only.

I'm certain there must be more efficient ways to do this in SQL, but this was the first thing I thought of. Explanation:

  1. Declare an in-memory table with values 0 to 9
  2. Cross-join 4 copies of this table for all possible values from 0000 to 9999
  3. Messy WHERE clause to ensure the digits are strictly increasing (or both 0)
  4. Smash the digits together (CONCAT) and convert to integer (+0)
  5. The resulting rows may or may not be sorted, but the challenge doesn't appear to require that.

PHP, 51 bytes

while($n<1e4)count_chars($n,3)-$n++||print~-$n."
";

Run with -nr or try it online.


count_chars($string,$mode=3) returns a string of all used characters in ascending order.
This equals the input if, and only if, its characters (in this case: digits) are strictly increasing.

$n is NULL in the first iteration; count_chars returns an empty string; NULL-"" is evaluated as 0-0.

Oracle SQL, 163 bytes

Various ways to generate combinations

with a(n)as(select level-1 from dual connect by level<11),r(i,x,s)as(select 1,n,n||''from a union all select i+1,n,s||n from r,a where(x<n or n+x=0)and i<4)select s+0 from r where i=4;

with a(n)as(select level-1 from dual connect by level<11)select a.n||b.n||c.n||d.n+0 from a,a b,a c,a d where(a.n<b.n or a.n+b.n=0)and(b.n<c.n or b.n+c.n=0)and(c.n<d.n or c.n+d.n=0);

with a(n)as(select level from dual connect by level<11)select unique replace(sys_connect_by_path(n-1,'#'),'#')+0 from(a)connect by level<5and prior n<n order by 1;
  1. Rec with (CTE), 184 bytes
  2. Self joins, 182 bytes
  3. Connect by, 163 bytes

Just for fun

with t(c)as(select ku$_vcnt(1,2,3,4,5,6,7,8,9) from dual)
select listagg(value(z)) within group (order by 0) + 0 n
  from (select rownum r, value(r) v
          from t, table(powermultiset(c)) r),
       table(v) z
 where cardinality(v) < 5
group by r union select 0 from dual

.

with a(n)as(select decode(level,10,null,level) from dual connect by level<11)
select nvl(a.n || b.n || c.n || d.n + 0, 0) n
  from a, a b, a c, a d
 where nvl2(b.n, sign(b.n - a.n), 1) = 1
   and nvl2(c.n, sign(c.n - b.n), 1) = 1
   and nvl2(d.n, sign(d.n - c.n), 1) = 1
 order by 1

Perl 6, 25 bytes

[<](.comb)&&.say for ^1e4

-1 byte thanks to nwellnhof

Try it online!

.comb produces a list of the digits of each number, and [<] does a less-than reduction on that list, equivalent to: digit1 < digit2 < ... < digitN.

JavaScript REPL, 64 bytes

A bit of pub golf so probably far from optimal.

(f=n=>n&&f(n-1)+([...n+``].every(x=>y<(y=x),y=0)?`
`+n:``))(7e3)

Try it online

Yes, doing it without an IIFE would be a few bytes shorter but that throws an overflow error when called, which would normally be fine as we can assume infinite memory for the purposes of code golf but, to me, doesn't seem to be in the spirit of KC challenges.

JavaScript, 83 bytes

Borrowed some ideas from @Shaggy, but without recursion.

[...Array(1e4)].reduce((s,_,n)=>s+=([...n+''].every(x=>y<(y=x),y=0))?'\n'+n:'','0')

Try it online!

Ruby, 39 bytes

puts (?0..?9*4).grep /^#{[*0..9]*??}?$/

Try it online!

K (ngn/k) / K (oK), 32 30 26 bytes

Solution:

`0:$&&/'1_'>':'" ",'$!9999

Try it online!

Explanation:

`0:$&&/'1_'>':'" ",'$!9999 / the solution
                     !9999 / range 0..9998 (could use !6890)
                    $      / string
               " ",'       / prepend " " to each (lower than "0" in ascii)
            >:'            / greater-than each-previous?
         1_'               / drop first result from each
      &/'                  / max (&) over (/)
    &                      / indices where true
   $                       / convert to string
`0:                        / print to stdout

K4, 19 bytes

Solution:

-1@$&&/'>':'$!9999;

Explanation:

-1@$&&/'>':'$!9999; / the solution
             !9999  / range 0..9998
            $       / string
        >':'        / greater-than (>) each-previous (':) each (')
     &/'            / max (&) over (/)
    &               / indices where true
   $                / string
  @                 / apply
-1                ; / print to stdout and swallow return value (-1)

MATLAB, 52 bytes

arrayfun(@(n)disp(n(all(diff(num2str(n))>0))),0:1e4)

PowerShell, 42 40 bytes

0..1e4|?{-join("$_"|% t*y|sort -u)-eq$_}

Try it online!

Loop from 0 to 1e4 (i.e., 10000). Pull out those objects where |?{...} the number as a string $_ is -equal to the number cast toCharArray and then sorted with the -unique flag. In other words, only numbers that are the same as their sorted and deduplicated strings. Each of those are left on the pipeline and output is implicit.

Wolfram Language (Mathematica), 36 bytes

After I wrote this, it was clarified that each number must be on a new line, so +7 bytes for the Print/@.

This method takes advantage of the fact that the Subsets function 1) doesn't replicate any digits and 2) sorts the output by set size and set contents. FromDigits assembles each list of digits.

-1 byte thanks to @Mr.Xcoder

Print/@FromDigits/@Range@9~Subsets~4

Try it online!

Bash + GNU Core Utilities, 57 bytes

seq 1e4|grep -vP `seq 0 9|sed 's/./(&[0-&])/'|tr '
' \|`p

Uses some meta-regex-generation shit

Jelly, 13 9 8 bytes

Saved 5 bytes thanks to @Dennis

9œcⱮ4ẎŻY

Try it online!

Explanation

Generates all lexicographically increasing numbers below 10000 by taking the digits [1...9] and finding all combinations of length ≤ 4.

9œcⱮ4ẎŻY    Main link. Arguments: none
9           Yield 9.
   Ɱ4       For each n in [1...4]:
 œc           Yield the combinations of the range [1...9] of length n.
     Ẏ      Tighten; dump each of the 4 lists generated into the main list.
      Ż     Prepend a 0 to the list.
       Y    Join on newlines.

Jelly, 11 10 9 bytes

Saved a byte thanks to @EriktheOutgolfer

ȷ4Ḷ<ƝẠ$ƇY

Try it online!

Explanation

Filters through the range, keeping the numbers that are lexicographically increasing.

ȷ4Ḷ<ƝẠ$ƇY    Main link. Arguments: none
ȷ4           Yield 10^4 (10000).
  Ḷ          Generate the range [0...10000).
       Ƈ     Filter; yield only the numbers where this link return a truthy value.
      $        Run these two links and yield the result.
    Ɲ            For each pair of items (digits) in the number:
   <               Check whether the left digit is less than the right digit.
     Ạ           All; check that every comparison yielded true.
               This yields whether the digits are strictly increasing.
        Y    Join the filtered list on newlines.

Jelly, 7 bytes

<ƝẠ$⁹#Y

Try it online!

How?

<ƝẠ$⁹#Y - Main Link: no arguments (implicit z=0)
    ⁹   - literal 256
     #  - count up from n=z (0) finding the first 256 for which this is truthy:
   $    -   last two links as a monad:
 Ɲ      -     neighbours (implicitly gets digits of n):
<       -       less than?
  Ạ     -     all truthy? (N.B. yields 1 for an empty list)
      Y - join with newlines

Python 2, 55 bytes

i=0
exec"print i\ni+=1\nif eval('<'.join(`i`)):1;"*7000

Try it online!

05AB1E (legacy), 8 bytes

4°ÝD€êû

Try it online!

Works in the new version of 05AB1E as well but is painfully slow for some reason.

How?

4°ÝD€êû – Full program.
4°Ý      – Push [0 ... 10000].
   D€ê   – Push each integer in [0 ... 10000] sorted and deduplicated at the same time.
      û – And join the interection of the two lists by newlines.

Pyth, 10 bytes

jiRThc2yS9

Try it online!

How it works

jiRThc2yS9
        S9  Yield [1, 2, 3, 4, 5, 6, 7, 8, 9].
       y    Take all 512 subsets.
     c2     Split the array of subsets into 2 pieces (256 subsets each).
    h       Head; take the first piece.
 iRT        Convert each subset from base 10 to integer.
j           Separate by newlines.

Pyth, 15 bytes

jf.A<V`Tt`TU^T4

Try it here!

Retina 0.8.2, 38 bytes


9999$*
.
$.`¶
.
$*_$&
A`(_*)\d\1\d
_

Try it online! Explanation:


9999$*

Insert 9999 characters.

.
$.`¶

Convert into a list of numbers 0..9998

.
$*_$&

Prefix each digit with its value in _s.

A`(_*)\d\1\d

Delete lines containing nonincreasing digits.

_

Remove the now unnecessary _s.

Common Lisp, 74 72 bytes

(dotimes(i 7e3)(format(apply'char<(coerce(format()"~d"i)'list))"~d~%"i))

Try it online!

-2 bytes thank to @Shaggy!

Red, 59 bytes

repeat n 9999[if(d: n - 1)= do sort unique form d[print d]]

Try it online!

Haskell, 56 55 bytes

Edit: -1 byte thanks to @Ourous

mapM print$filter(and.(zipWith(<)<*>tail).show)[0..6^5]

Try it online!

Haskell, 50 bytes

unlines[s|s<-show<$>[0..6^5],s==scanl1(max.succ)s]

Try it online!

Outputs a multiline string. We check that the number s increasing using s==scanl1(max.succ)s, a variant of the usual sortedness check s==scanl1 max s that ensures strict sortedness by incrementing each digit character before taking the maximum of it and the next digit.

Ourous saved a byte by using 6^5 as the upper bound in place of a 4-digit number.

Clean, 90 bytes

import StdEnv
Start=(0,[('
',n)\\n<-[1..6^5]|(\l=removeDup l==sort l)[c\\c<-:toString n]])

Try it online!

J, 26 bytes

,.(#~(-:/:~@~.)@":"0)i.1e4

Try it online!

explanation

,. (#~ (-: /:~@~.)@":"0) i.1e4
                         i.1e4  NB. list 0 to 9999
                     "0         NB. for each number in the input list
                  @":"0         NB. convert it to a string and
   (#~ (         )              NB. remove any not passing this test:
        -:                      NB. the string of digits matches
              @~.               NB. the nub of the digits (dups removed)
           /:~                  NB. sorted
,.                              NB. ravel items: take the result of all that
                                NB. and turn it into a big column

Jelly, 7 bytes

9ŒPḌḣ⁹Y

Try it online!

How it works

9ŒPḌḣ⁹Y  Main link. No arguments.

9        Set the return value to 9.
 ŒP      Powerset; promote 9 to [1, ..., 9] and generate all subsets.
   Ḍ     Undecimal; map the subsets of digits to the integers they represent.
     ⁹   Yield 256.
    ḣ    Dyadic head; take the first 256 elements of the integer list.
      Y  Separate the result by linefeeds.

Stax, 8 bytes

¬ ▬A♥¶N∙

Run and debug it

R, 62 49 bytes

`[`=write;0[1];for(i in 1:4)combn(1:9,i)[1,i,,""]

Try it online!

Because combn iterates through its input in the order given, it's easy to create all the lexicographically increasing integers, printing them out in order. write prints them each i-digit number in lines of width i, neatly fulfilling the newline requirement as well.

Charcoal, 19 bytes

ΦEXχ⁴Iι¬Φι∧쬋§ι⊖μλ

Try it online! Link is to verbose version of code. Explanation:

   χ                Predefined variable 10
  X                 To the power
    ⁴               Literal 4
 E                  Map over implicit range
      ι             Current value
     I              Cast to string
Φ                   Filter over strings where
         ι          Current string
        Φ           Filtered over characters
           μ        Character index (is nonzero)
          ∧         And
                 μ  Character index
                ⊖   Decremented
              §     Indexed into
               ι    Current string
            ¬       Is not
             ‹      Less than
                  λ Current character
       ¬            Results in an empty string
                    Implicitly print matches on separate lines

Python 2, 56 bytes

for n in range(9999):
 if eval('<'.join(`n`))**n:print n

Try it online!

Converts each number like 124 to an expression 1<2<4 and evaluates it to check if the digits are sorted,

A hiccup happens for one-digit numbers giving an expression that just is the number itself. This causes 0 to evaluate to a Falsey value even though it should be printed. This is fixed by a trick suggested by Erik the Outgolfer of doing **n, which gives truthy value 0**0 for n=0 and doesn't affect the truth value otherwise.

V, 41 bytes

7000ïÎaÛ
Îy$úúP
Ç^¨ä*©±$/d
ÎãlD
爱/d
HO0

Try it online!

Hexdump:

00000000: 3730 3030 efce 61db 0ace 7924 fafa 500a  7000..a...y$..P.
00000010: c75e a8e4 2aa9 b124 2f64 0ace e36c 440a  .^..*..$/d...lD.
00000020: e788 b12f 640a 484f 30                   .../d.HO0

Python 2, 64 61 bytes

lambda:[x for x in range(9999)if sorted(set(`x`))==list(`x`)]

Try it online!

Gets the unique characters of the integer's string representation, sorts them, and compares the result to the original number.

Python 2, 61 bytes

for i in range(9999):
 if list(`i`)==sorted(set(`i`)):print i

Try it online!

Python 2, 63 bytes

for i in range(6790):
 if`i`=="".join(sorted(set(`i`))):print i

Try it online!