구성 요소를 대화형으로 사용하면 필요에 따라 셸 스크립트를 작성하는 것이 유용할 수 있습니다.Once you are familiar with using interactively, according to your needs, writing shell scripts with it may be useful. 다음은 게스트에 새로운 MOTD(메시지)를 추가하는 간단한 쉘 스크립트입니다.
#!/bin/bash -
set -e
guestname="$1"
guestfish -d "$guestname" -i <<'EOF'
write /etc/motd "Welcome to Acme Incorporated."
chmod 0644 /etc/motd
EOF
#!/bin/bash -
set -e
guestname="$1"
guestfish -d "$guestname" -i <<'EOF'
write /etc/motd "Welcome to Acme Incorporated."
chmod 0644 /etc/motd
EOF
Copy to ClipboardCopied!Toggle word wrapToggle overflow