Skip to content

Commit

Permalink
Update Duplicate and empty lines removal.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
HotCakeX committed Feb 13, 2024
1 parent 902f466 commit 8a94a6f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/Duplicate and empty lines removal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@ jobs:
- name: Run a one-line script
shell: pwsh
run: |
(Get-Content -Path 'Microsoft Domains.txt').Trim() |
ForEach-Object -Process { $_.ToLower().Split() } |
Where-Object -FilterScript { ($_.trim() -ne '') -and ($_ -match '[a-zA-Z0-9]') -and ($_ -notmatch '^xn--.*' ) } |
Select-Object -Unique | Set-Content -Path 'Microsoft Domains.txt' -Force
[System.String]$File1 = 'Microsoft Domains.txt'
[System.String]$File2 = 'Microsoft Domains Extra.txt'
[System.String[]]$File1Content = (Get-Content -Path $File1).Trim() |
Where-Object -FilterScript { ($_.trim() -ne '') -and ($_ -match '[a-zA-Z0-9]') -and ($_ -notmatch '^xn--.*' ) } | Select-Object -Unique
$File1Content | Set-Content -Path $File1 -Force
(Get-Content -Path $File2).Trim() |
Where-Object -FilterScript { ($_.trim() -ne '') -and ($_ -match '[a-zA-Z0-9]') -and ($_ -notmatch '^xn--.*' ) -and ($_ -notin $File1Content) } |
Select-Object -Unique | Set-Content -Path $File2 -Force
git config --global user.email "spynetgirl@outlook"
git config --global user.name "HotCakeX"
Expand Down

0 comments on commit 8a94a6f

Please sign in to comment.