문제
The password for the next level is stored in a file called spaces in this filename located in the home directory
홈 디렉토리에 있는 spaces in this filename에 비밀번호가 있다.
처음에 바로 cat 명령어를 통해 spaces in this filename 이라는 파일을 읽을려고 시도함
다만 cat 명령어 뒤에 spaces in this filename 이라고 들어오면 인자가 4개 있다고 인식 한다. 즉 spaces, in ,this, filename 이렇게 4개의 파일을 찾을려고 한다.
cat "spaces in this filename"
이렇게 큰 따옴표로 감싸주는 방법
cat spaces\ in\ this\ filename
이렇게 이스케이프를 사용해서 공백을 명시적으로 표현 해줄 수 있다.
똑같이 나오는 것을 확인 할 수 있다.
이 문제를 통해 리눅스에서 파일 이름에 공백이 포함될 때 주의할 점을 배울 수 있었다.