본문 바로가기

반응형

전체 글

(304)
해밀턴 : 카키 네이비 파이오니아 크로노 H77706553 해밀턴은 정통 스위스 시계가 아니다. 미국 태생이나 경영상의 어려움을 못 이기고 스위스로 넘어간 브랜드다. 그렇기에 해밀턴은 아메리카와 유럽의 문화가 섞여 흐르는 시계다. 해밀턴의 파이오니아 시계에서는 다른 시계에서 쉽게 찾아볼 수 없는 특별한 모양의 러그를 찾아볼 수 있다. 12시와 6시에 스트랩을 걸수있는 러그는 베젤 테두리에서 자연스럽게 아래로 이어지는 것이 아니라 가늘고 긴 파이프 형태의 둥근 러그가 테두리에서 툭 하고 튀어나와 매끄럽게 직각으로 휘어 스프링 바와 연결된다. 클래식하면서도 독특한 디자인으로 인해 감성적인 분위기를 풍긴다. 3시 방향에는 해밀턴을 상징하는 H자가 양각으로 세긴 크라운이 있고 2시와 4시에는 크로노 기능을 위한 버튼이 깔끔하게 튀어나와 있어 실로 멋있어 보인다. 다만,..
PowerShell : 기본 명령어 PowerShell 버전 확인 $PSVersionTable 스크립트가 실행되는 경로 확인 (PowerShell 앱 실행이 아닌 스크립트 실행시에 해당) $PSScriptRoot 클립보드로 복사 Set-ClipBoard "클립보드로 복사되었습니다. CTRL+V로 붙여넣기 해보세요"
PowerShell : Alias - Alias # 기본 Get-Alias # Alias 약칭 찾기 Get-Alias copy # Alias 약칭 찾기 (와일드카드) Get-Alias wh* Get-Alias *p Get-Alias a*p # Alias 본명칭 찾기 Get-Alias -Definition copy-item Get-Alias -Definition *item - Alias 만들기 # ls 명령어를 Set-Alias lsa ls - Alias 삭제 Remove-Alias lsa - 주의점 세션이 끝난 경우 만들었던 Alias는 자동적으로 삭제된다. about_Aliases About Aliases In this article --> SHORT DESCRIPTION Describes how to use alternate name..
PowerShell : 특수문자 $ : 달러 사인 # $ : 변수 할당 $newVar = 10 # $_ : $PSItem의 축약, 파이프라인 뒤로 넘어오는 결과값인 객체를 가리킨다. ls "C:\" | % {$_} # $_.멤버명 : 객체 멤버를 선택 할수도 있다. ls "C:\" | % {$_.name} ` : 그레이브 액센트 사인 # 에러! $str = "인용하자면 "비가 오는 밤에는..." 소설책에서" # 정상 $str = "인용하자면 `"비가 오는 밤에는...`" 소설책에서" # \n New Line 역할 $str = "첫 번째 줄`n두 번째 줄" # \r Carriage Return 역할 $str = "첫 번째 줄`r두 번째 줄" # : 샵 사인 # 한줄 주석 처리 % : 퍼센트 사인 # Foreach문 축약 ls "C:\" ..
PowerShell : Date - 날짜 # 현재 날짜 Get-Date # 현재 날짜 (포맷) Get-Date -Uformat "%Y-%m-%d %H:%M" # 날짜 변경 (포맷) Get-Date -Uformat "%Y-%m-%d %H:%M" -Year 1999 -Hour 19 # 일자로 계산 (Get-Date -Year 2010 -Month 12 -Day 31).DayOfYear # 요일 (Get-Date -Year 2010 -Month 12 -Day 31).DayOfWeek # 날짜 +- 계산 (AddDays / AddMonths / AddYears) (Get-Date -Year 2011 -Month 12 -Day 31).adddays(1) Get-Date (Microsoft.PowerShell.Utility) The Get-Dat..
PowerShell : IEX (문자열을 명령어로 실행하기) - String으로 된 명령어 실행 $msg = "Write-Host `"글자를 출력하세요.`" # $msg와 iex $msg를 비교해보세요. $msg iex $msg Invoke-Expression (Microsoft.PowerShell.Utility) The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. Without Invoke-Expression, a string submitted at the command line would be returned (echoed) unchanged. docs.microsoft.com
PowerShell : 기초 명령어 (복사, 삭제, 이동) - 복사 # 복사 Copy D:\test1.txt D:\test2.txt # 강제 복사 (읽기 속성이 있는 경우) Copy D:\test1.txt D:\test2.txt -Force # 폴더 복사 Copy D:\folder1 D:\folder2 # 폴더내 파일까지 복사(폴더 하위 폴더 파일은 제외) Copy D:\folder1\* D:\folder2 # 폴더 전체 복사 Copy D:\folder1 D:\folder2 -Recurse Copy-Item (Microsoft.PowerShell.Management) The Copy-Item cmdlet copies an item from one location to another location in the same namespace. For instance,..
PowerSehll : Try, Catch, Finally (예외 처리) - Try, Catch, Finally Try{ 에러나는이상한문자 } Catch{ Write-Host "이상한 문자가 있던데요?" Write-Host $_ }finally{ Write-Host "에러와 상관없이 실행할꺼야!" } $_ : 에러 표출을 위해 사용 about_Try_Catch_Finally About Try Catch Finally In this article --> SHORT DESCRIPTION Describes how to use the Try, Catch, and Finally blocks to handle terminating errors. LONG DESCRIPTION Use Try, Catch, and Finally blocks to respond to or handle term..

반응형