News for hackers. Stuff that matters.
Re:PowerShell is open sourced and is available on Linux by schoen on Thursday August 18, 2016 @12:20PM (#12313799)
> Quick, easy. In a *nix shell that would be very tricky.

You'd probably need to make an explicit SQL query since you wouldn't have the database integration.

Re:PowerShell is open sourced and is available on Linux by PeCaN on Thursday August 18, 2016 @12:28PM (#12313901)
Well, yeah, but I mean the concept (grepping in tabular data).

If, hypothetically, bash had database integration, ls Columns would probably return something like

  foo	varchar	30	NOT NULL
  bar	decimal	 8
  baz	int	 4
Which would be a royal PITA to search for anything in—if I were to search for ‘int’ I'd get all int columns and any columns with int in the name….

I could've used an example involving process lists, but I didn't want to trigger PTSD in anyone who's had to grep the output of ‘ps’ for anything non-trivial. (Plus, the database thing was something I actually did a few days ago.)

Re:PowerShell is open sourced and is available on Linux by stepvhen on Thursday August 18, 2016 @12:40PM (#12314038)
But thats why there are tools like awk.
Re:PowerShell is open sourced and is available on Linux by PeCaN on Thursday August 18, 2016 @12:43PM (#12314060)
awk is rather similar in many ways to powershell, actually, but untyped. I agree most of what powershell does you can do with awk, but it's often less pleasant than powershell (in my experience).
Re:PowerShell is open sourced and is available on Linux by firethief on Thursday August 18, 2016 @01:00PM (#12314224)
ps aggregates /proc info for human viewing. Why grep the formatted output rather than the source data?
Re:PowerShell is open sourced and is available on Linux by PeCaN on Thursday August 18, 2016 @01:05PM (#12314304)
Maybe on Linux. OpenBSD doesn't even have procfs, FreeBSD deprecated it, DragonFlyBSD doesn't mount it by default.

/proc is a race condition waiting to happen, so I can't really say I recommend using that.