Last active
February 26, 2017 12:25
-
-
Save karino2/34337e46c51f6ec1cac55b1746113968 to your computer and use it in GitHub Desktop.
PowerShell script of bookmark for editbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter fifi { | |
$drv = $_.substring(0, 2) | |
$splits = $_.substring(2).split(":") | |
if ($splits.length -eq 1) { | |
$_ | |
} else { | |
$drv + $splits[0] | |
} | |
} | |
function fio { | |
$target = $input | fifi | select-object -first 1 | |
ebclient $target | |
} | |
$g_bookmark_path = "C:\Users\karino2\home.txt" | |
function book { | |
if ($args.Length -eq 0) { | |
cat $g_bookmark_path; | |
return; | |
} | |
$pat = $args[0]; | |
cat $g_bookmark_path | ?{ $_ -match $pat} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment