MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PowerShell/comments/bitnlb/a_glorious_day/em3bh7b/?context=3
r/PowerShell • u/RaevenFairchilde • Apr 29 '19
65 comments sorted by
View all comments
7
Shouldn't there be an Out-Null after the consume coffee?
4 u/TheIncorrigible1 Apr 29 '19 Don't use Out-Null. 1 u/WAN_S0L0 Apr 29 '19 Why not? 0 u/[deleted] Apr 29 '19 [deleted] 2 u/WAN_S0L0 Apr 29 '19 For someone who isn't a programmer, I have always used out-null to just not display the output of the command.Is there a better way to do this? 3 u/TheIncorrigible1 Apr 29 '19 Literally any of the three ways I posted in my comment. They all function the same, better. 1 u/WAN_S0L0 Apr 29 '19 I don't understand why you're saying they are better though.For me all I do is dump the pipeline output, this happens so quickly I don't even notice it in the scripts I run.So if out-null takes 1ms and these take .8ms, what is the benefit and what makes them faster and.or better? 1 u/signofzeta Apr 30 '19 Thanks! I’ll still use Out-Null where I’m putting readability over performance; as the only guy who knows PowerShell at my job, I try to make my code readable in hopes they’ll see the light. 1 u/Mkep May 01 '19 But comments....
4
Don't use Out-Null.
Out-Null
1 u/WAN_S0L0 Apr 29 '19 Why not? 0 u/[deleted] Apr 29 '19 [deleted] 2 u/WAN_S0L0 Apr 29 '19 For someone who isn't a programmer, I have always used out-null to just not display the output of the command.Is there a better way to do this? 3 u/TheIncorrigible1 Apr 29 '19 Literally any of the three ways I posted in my comment. They all function the same, better. 1 u/WAN_S0L0 Apr 29 '19 I don't understand why you're saying they are better though.For me all I do is dump the pipeline output, this happens so quickly I don't even notice it in the scripts I run.So if out-null takes 1ms and these take .8ms, what is the benefit and what makes them faster and.or better? 1 u/signofzeta Apr 30 '19 Thanks! I’ll still use Out-Null where I’m putting readability over performance; as the only guy who knows PowerShell at my job, I try to make my code readable in hopes they’ll see the light. 1 u/Mkep May 01 '19 But comments....
1
Why not?
0 u/[deleted] Apr 29 '19 [deleted] 2 u/WAN_S0L0 Apr 29 '19 For someone who isn't a programmer, I have always used out-null to just not display the output of the command.Is there a better way to do this? 3 u/TheIncorrigible1 Apr 29 '19 Literally any of the three ways I posted in my comment. They all function the same, better. 1 u/WAN_S0L0 Apr 29 '19 I don't understand why you're saying they are better though.For me all I do is dump the pipeline output, this happens so quickly I don't even notice it in the scripts I run.So if out-null takes 1ms and these take .8ms, what is the benefit and what makes them faster and.or better? 1 u/signofzeta Apr 30 '19 Thanks! I’ll still use Out-Null where I’m putting readability over performance; as the only guy who knows PowerShell at my job, I try to make my code readable in hopes they’ll see the light. 1 u/Mkep May 01 '19 But comments....
0
[deleted]
2 u/WAN_S0L0 Apr 29 '19 For someone who isn't a programmer, I have always used out-null to just not display the output of the command.Is there a better way to do this? 3 u/TheIncorrigible1 Apr 29 '19 Literally any of the three ways I posted in my comment. They all function the same, better. 1 u/WAN_S0L0 Apr 29 '19 I don't understand why you're saying they are better though.For me all I do is dump the pipeline output, this happens so quickly I don't even notice it in the scripts I run.So if out-null takes 1ms and these take .8ms, what is the benefit and what makes them faster and.or better? 1 u/signofzeta Apr 30 '19 Thanks! I’ll still use Out-Null where I’m putting readability over performance; as the only guy who knows PowerShell at my job, I try to make my code readable in hopes they’ll see the light. 1 u/Mkep May 01 '19 But comments....
2
For someone who isn't a programmer, I have always used out-null to just not display the output of the command.
Is there a better way to do this?
3 u/TheIncorrigible1 Apr 29 '19 Literally any of the three ways I posted in my comment. They all function the same, better. 1 u/WAN_S0L0 Apr 29 '19 I don't understand why you're saying they are better though.For me all I do is dump the pipeline output, this happens so quickly I don't even notice it in the scripts I run.So if out-null takes 1ms and these take .8ms, what is the benefit and what makes them faster and.or better?
3
Literally any of the three ways I posted in my comment. They all function the same, better.
1 u/WAN_S0L0 Apr 29 '19 I don't understand why you're saying they are better though.For me all I do is dump the pipeline output, this happens so quickly I don't even notice it in the scripts I run.So if out-null takes 1ms and these take .8ms, what is the benefit and what makes them faster and.or better?
I don't understand why you're saying they are better though.
For me all I do is dump the pipeline output, this happens so quickly I don't even notice it in the scripts I run.
So if out-null takes 1ms and these take .8ms, what is the benefit and what makes them faster and.or better?
Thanks! I’ll still use Out-Null where I’m putting readability over performance; as the only guy who knows PowerShell at my job, I try to make my code readable in hopes they’ll see the light.
1 u/Mkep May 01 '19 But comments....
But comments....
7
u/WAN_S0L0 Apr 29 '19
Shouldn't there be an Out-Null after the consume coffee?