Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
חנן כהן • Hanan Cohen
@hananc@tooot.im  ·  activity timestamp 4 months ago

I am using #AWK for only one command.

ia tasks | awk -F "identifier" "{s+=(NF-1)} END {print s}"

It counts my Internet Archive tasks that are currently running.

Now that I have a new computer, I didn't want to install AWK for just one command. I asked Claude to write me the same command for PowerShell.

(ia tasks | ForEach-Object { ($_ -split "identifier").Count - 1 } | Measure-Object -Sum).Sum

Sad to say goodby to AWK. It was very useful to me three jobs ago.

  • Copy link
  • Flag this post
  • Block
נקודה ופסיק; Semicolon
@semicolon@tooot.im replied  ·  activity timestamp 4 months ago
@hananc
just gotta say, I can read the powershell line and understand what it does. as for awk it looks gibrish.
(me showing my powershell love again)
  • Copy link
  • Flag this comment
  • Block
חנן כהן • Hanan Cohen
@hananc@tooot.im replied  ·  activity timestamp 4 months ago
@semicolon you might enjoy listening to the story of the creation of powershell

https://pca.st/episode/6c8fef16-10f1-44e7-b6a7-6f2e06fe1096

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.21 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login