/now
projects
ramblings
smol projects

idk anything and apparently this is common

06.11.2023 1 min read

Yesterday, I posted about zx. I said it was really weird and jank that you could simply wrap commands in backticks and the javascript file would execute said commands in the shell.

Today, I found out that you could always do this with ruby, and by extension, I guess you can do it in crystal too…

# ruby, crystal - not much diff in this context
files = `ls`.split("\n")

files.each do |f|
  next if f == 'script.ruby'
  file = f.split(".")
  puts file
end

files = `ls`.split("\n").select {|e| !e.empty? }
files.each do |f|
  puts `cat #{f} | grep #{ARGV[0]}`
end

So. The conclusion is. This is all very normal and idk anything.

Built with Astro and Tailwind 🚀