Hacker News new | ask | show | jobs
by crabsand 53 days ago
nushell + 1. After ~20 years of bash+zsh, I'm translating all my scripts to nu.

Yesterday I noticed I still don't know how to write

  ls | where modified < ((date now) - 3wk) | each { |fn| rm $fn.name } 
in zsh after all years.
3 comments

   find . -type f -mtime +21 -delete
Or if you have fd

   fd -t f --changed-before 3w -X rm
I use fish as daily shell, and for this kind of script I would rather jump to ruby. But it looks rather readable.
Whoa. You people freak me out with your fancy new toys.