5 ms·
"echo *" just prints "*" on bash unfortunately.
by sedatk 3y ago
"echo *" just prints "*" on bash unfortunately.
- bryanlarsen 3y agoThat's its behaviour in an empty directory, but it works for me on a non-empty directory.
- tp34 3y agoshopt -s dotglob
- seanhunter 3y agoYes. Or one lowtech method I use often is `touch ~/-i`. When someone tries to rm -rf * the file called “-i” gets globbed at the front of the arguments and the subsequent command goes into “interactive “ mode meaning it prompts y/n for each file
- tpoacher 3y agoNice! Great "bug as a feature" trick!
- raldi 3y agoWhat version of bash do you see this happening on? Mine works as expected.
- sedatk 3y agoI happened to try it in a directory with only dotfiles apparently.