문서의 이전 판입니다!
source /dev/stdin
으로 해주면 된다.ls | sed ... | source /dev/stdin
cat <<EOF >/home/a.config first line second line third line EOF
find . -type f | while read -r line do echo "$line" done # one liner find . -type f | while read -r line; do echo "$line"; done # 혹은 while read -r line do echo "$line" done < <(find . -type f)
명령 || 다른 명령
을 하면 첫번째 명령이 성공하면 그대로 넘어가고 실패했을 경우에는 다른 명령을 실행하고 그 결과를 최종 반환한다.# curl 명령 실패시에 "{}" 를 변수에 값으로 저장 TEST_RESULT=$(curl -Ss https://.... || echo "{}")