4 ms·
I have a bash alias that creates a random playlist of videos or music with ls. I noticed that sometimes there were duplicates in the list. If I can't use ls, i
by jmnicolas 5y ago
I have a bash alias that creates a random playlist of videos or music with ls. I noticed that sometimes there were duplicates in the list.
If I can't use ls, it's not going to be a one liner anymore, so I have to create a file, store it somewhere, assign execute privileges and link my alias to it. Much more complicated.
- theamk 5y agoUm, no? As examples show, "find -maxdepth" can do the same things, but safely. And in most cases, it'd still be one-liner, even if a longer one.
- rascul 5y ago> so I have to create a file, store it somewhere, assign execute privileges and link my alias to it Or put it in a function in the same file your alias is in.
- aidenn0 5y agoyou can't call shell functions via "find -exec" or xargs