Question: I want to get a numbered list of files, e.g. if I have these files:

```
a.pdf
b.pdf
c

```

then it should be listed as:

```
1 a.pdf
2 b.pdf
3 c

```

Answer: 
If you want to [avoid parsing the output of `ls`](http://mywiki.wooledge.org/ParsingLs) (which you do), you can do something like this:

```
$ counter=1; for f in *; do printf "%2d %s\n" $((counter++)) "$f"; done
 1 a.pdf
 2 b.pdf
 3 c

```

I only mention this because it's the path for doing more sophisticated things, not just enumerating.
If your system has command `nl`, it will be easier. ( I can confirm `nl` command is exist in cygwin, aix and solaris system, then it should be popular command in most unix system)

```
ls |nl

```