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.
If, hypothetically, bash had database integration, ls Columns would probably return something like
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.)