Skip to content

powershell版本 #36

@liuwentao

Description

@liuwentao
#  毒鸡汤
function jitang {
    $dir =(get-item $profile).Directoryname
    $line = Get-Random -Maximum   (Get-Content -Path "$dir\data.txt" | Measure-Object).count
    $msg = (Get-Content -Path "$dir\data.txt" -TotalCount $line)[-1]
    Write-Output ('{0} {1}'-f (Get-Date -Format "yyyy-MM-dd HH:mm:ss"),$msg)
}

data.txt就是那个数据文件了,没行一条鸡汤就可以了。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions