Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/csh
- # Nama file
- set file_name = "index.html"
- # Membuat atau mengosongkan file index.html
- > "$file_name"
- # Meminta pengguna untuk memasukkan judul halaman
- echo "Masukkan judul halaman: "
- set page_title = "$<"
- # Meminta pengguna untuk memasukkan konten paragraf
- echo "Masukkan konten paragraf: "
- set paragraph_content = "$<"
- # Menambahkan konten ke dalam file index.html
- echo "<!DOCTYPE html>" >> "$file_name"
- echo "<html>" >> "$file_name"
- echo "<head>" >> "$file_name"
- echo " <title>$page_title</title>" >> "$file_name"
- echo "</head>" >> "$file_name"
- echo "<body>" >> "$file_name"
- echo " <h1>$page_title</h1>" >> "$file_name"
- echo " <p>$paragraph_content</p>" >> "$file_name"
- echo "</body>" >> "$file_name"
- echo "</html>" >> "$file_name"
- echo "File index.html berhasil dibuat."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement