Does anyone on Jow Forums use Powershell?

Does anyone on Jow Forums use Powershell?

Attached: 1523831605971.png (318x314, 10K)

Other urls found in this thread:

pastebin.com/raw/8rfYEN5N
pastebin.com/raw/8rfYEN5N').content
pastebin.com/kE4BKMa8
pastebin.com/raw/FWkiqmAz
pastebin.com/raw/m5DYS2ii
github.com/PowerShell/PowerShell
reddit.com/r/sysadmin/comments/624a0j/powershell_seriously/
twitter.com/NSFWRedditGif

of course

What use would I need.

I only use it for CLI tools like youtube-dl or ffmpeg. It could be any command interpreter it wouldn't change anything.

I live in powershell everyday. I love it.

I've worked in Linux shops all my life, so while I've been aware of powershell's existence, I've never spent any time on it until this week.

Holy crap. It's actually good.

Imagine if every unix command had an --output-json flag, and a matching parser on the front-end.

No more fiddling about in textutils, grepping and awking and cutting and sedding, no more counting fields, no more tediously filtering out the header line from the output; you can pipe whole sets of records around, and select-where across them.

I'm only just starting out, so I'm sure there's much horribleness under the surface, but what little I've seen so far would seem to crap all over bash.

Why did nobody tell me about this?

You'll continue to love it.you will find bugs, you will find annoyingness. But with it being open sourced and with .netcore the community is huge and it's constantly being worked on. Also, I sure hope you are using vscode.

Please help me. I need a powershell script to get rid of the duplicated lines to the same path.

Drop your BTC or ETH address with a 100% functional code without any issues and I'll give you 20 bucks

pastebin.com/raw/8rfYEN5N

I do but only for work on exchange servers really

(iwr 'pastebin.com/raw/8rfYEN5N').content | Select -Unique | out-file C:\temp\dumb4channer.txt

Every windows sysadmin should know it. A shame that so many are dumb as a rock and can only click at things...

Don't understand your request

yes, very frustrating seeing certain colleagues shit themselves at the thought of using powershell

Get rid of the red lines, keep the green lines, repeat for every line in a text file

Attached: 1518039332929.png (760x975, 116K)

What are you even trying to accomplish, you just want one unique path regardless of the 00x - 00.jpg?

Attached: maybe.png (1016x560, 22K)

yes

fuck off

I mean, this will give you unique paths? But no file name.
$data = (iwr 'pastebin.com/raw/8rfYEN5N').content
$newSet = ($data -split '[\r\n]') |? {$_}

$Final1 = Foreach ($n in $newSet)
{
$n -replace '(\\.{0,50}.jpg)'
}

$Final1 | Select -Unique | out-file C:\temp\Jow Forums.txt

What does 0.50 do?

It's matching anything from 0-50 characters from the backslash to the .jpg

I've got 0 - 1000+, would it still work if I changed 50 to 1000? Also how do I make it scan a local text file instead of the website

PowerShell is actually great, it's a bit wordy, but that doesn't really bother me, don't tell me you fell for all the pajeet poo microshit posts on Jow Forums

Jow Forums thinks i am spam now..
see this
pastebin.com/kE4BKMa8

Not sure why it's not working now

Attached: 1519555308204.png (1693x940, 48K)

Write $data underneath all the code for me then run it.

>You have exceeded the maximum paste size of 512 kilobytes per paste. PRO users don't have this limit!
ouch, it's a long text file so i can't copy paste all of it

pastebin.com/raw/FWkiqmAz

Sorry, you can't use 10000 that is too large. I lied it has to be under 100...

I changed it to 100 and it's skipping getting rid of almost everything in certain lines
pastebin.com/raw/m5DYS2ii

Attached: 1518421375928.png (1568x326, 64K)

Here, if you need something larger than 100.. You can do this. it will match unlimited.

$data = Get-Content C:\temp\Jow Forums.txt
$newSet = ($data -split '[\r\n]') |? {$_}
$Final1 = Foreach ($n in $newSet)
{
$n -replace '(x\\.*.jpg)', 'x'
}
$Final1 | Select -Unique

One more thing.. Note this is assuming everypath ends in
.cbz_Ex\xxx - xx.jpg

Don't forget to use the OSS version! github.com/PowerShell/PowerShell

It hasn't skipped any files with this change yet, is it possible to make it detect "?" and replace it with " " (space)?

You have filenames 1000 characters long?

You can think of PowerShell as being like Python, Ruby, or Perl for .NET, only it's statically typed and it's also a shell.

Also, it runs on Linux now.

Yes..

$data = Get-Content C:\temp\Jow Forums.txt
$newSet = ($data -split '[\r\n]') |? {$_ }
$Final1 = Foreach ($n in $newSet)
{

$n.Replace("?", '') -replace '(x\\.*.jpg)' , "x"
}
$Final1 | Select -Unique

Wew, nice. This might sound weird, but is it possible to get rid of these parts too

Attached: 1520797300213.png (746x655, 58K)

Me, all the time

Anymore requests that deviate from your original?


$data = Get-Content C:\temp\Jow Forums.txt
$newSet = ($data -split '[\r\n]') |? {$_ }
$Final1 = Foreach ($n in $newSet)
{

$n.Replace("?", '') -replace '(x\\.*.jpg)' , "x" -replace '^.*[\\\/]', ''
}
$Final1 | Select -Unique

Your screenshot has the backslash. i assumed you wanted that gone, but if you want to keep it on that last -replace just do this.

-replace '^.*[\\\/]', '\'

my BTC address hasn't changed either. ;-)

Nice pasta

Lol how did you even think to check that..

reddit.com/r/sysadmin/comments/624a0j/powershell_seriously/

I just guessed

>Please help me. I need a powershell script to get rid of the duplicated lines to the same path.
>Drop your BTC or ETH address with a 100% functional code without any issues and I'll give you 20 bucks
>pastebin.com/raw/8rfYEN5N

Douche alert.

And this is a good reason why Jow Forums is not a tech support forum. To the idiot that requested stuff like this use stack overflow or Reddit. The the dude that got burned. Shame on you.