2
<<
의 사용법은 분명하지 않다. 간단한 예제로 설명 할 수 있을까? 정말 고맙습니다.하나의 리다이렉션 연산자가 나에게 명확하지 않다. <<
<<
의 사용법은 분명하지 않다. 간단한 예제로 설명 할 수 있을까? 정말 고맙습니다.하나의 리다이렉션 연산자가 나에게 명확하지 않다. <<
cat <<'EOF'
hello $$
I'm a here document that doesn't interpolate
any $-variables because of the qutoes around
the EOF marker
EOF
echo -------
cat <<EOF
hello $$
I'm a here document that does interpolate
EOF
echo -------
cat <<x
It doesn't matter what you use as the end of file marker
x
echo -------
cat <<'x'
Quotes prevent $-interpolation
x
출력 :
hello $$
I'm a here document that doesn't interpolate
any $-variables because of the qutoes around
the EOF marker
-------
hello 29843
I'm a here document that does interpolate
-------
It doesn't matter what you use as the end of file marker
-------
Quotes prevent $-interpolation
[배시 참조 설명서 : 3.6.6, 문서 작성 (https://www.gnu.org/software/bash/manual/html_node/Redirections.html) –
또는 컴퓨터에서'man bash'를 열고'<<'를 검색하십시오. – John1024