Hi, I'm using normally ls -l to get the content of a directoy.
But, it's possible to enumerate the ls output ? (like put the line number at the begining of each line)
If it wasn't possible (I don't hope so ...), there's a way to get the line number the line had after doing a grep:
ls -l /directory | grep word ----> and then get the line number it had in the ls output ...
And I'm writing a script, that in case of removing one of that links, for example the 001 one, the other links below must decrease it's name (in this example, if I'm removing the 001-default1, the 002-default2 must move its name to 001-default2, and so on). And I thought I would do it with some kind of loop within the line numbers.