3 ms·
Oh, I thought you meant in an arbitrary directory. If the first file in sorted order is executable and prints "*" to stdout you could get that.
by iudqnolq 7y ago
Oh, I thought you meant in an arbitrary directory. If the first file in sorted order is executable and prints "*" to stdout you could get that.
- emmelaich 7y agoI did mean an arbitrary directory. Your answer almost works; but only if PATH includes the current directory which is unusual. It does hint at another almost answer ... mkdir t cd t ln -s $(type -p ls) *