0
예 :history 명령에서 하나의 특정 명령을 실행하는 방법은 무엇입니까?
PS C:\Users\user01\Desktop\jogoForcaMVCSpring> history
Id CommandLine
-- -----------
1 history
2 ls
3 cd ..
4 cd .\jogoForcaMVCSpring
PS C:\Users\user01\Desktop\jogoForcaMVCSpring>
는 어떻게 이드는 2 정확한 명령을 실행할 수 있습니까? 아마 뭔가 같은
...
PS C:\Users\user01\Desktop\jogoForcaMVCSpring> execute history command -id 2
그것이 유일한 거리인지 또는 왜 그런지는 모르겠지만 작동하는 것처럼 보입니다. 나는 다른 의견을 기다리고있다. –
올바른 방법입니다. Get-History에서 파이프 라인을 통해 Invoke-History로 전달할 수도 있습니다. 예를 들면'Get-History -ID 2 | Invoke-History' – BenH