1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/bin/bash ls --file-type *.html >>lista.txt echo "<html>" >>index.html echo "<head> " >>index.html echo '<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >' >>index.html echo "<title> Lista plików </title>" >>index.html echo "</head>" >>index.html echo "<body>" >>index.html ile=$(wc lista) x=0 while [ $x -le $ile ]; do link=$(brakujace_polecenia $x) echo "<a href=$link>$link</a>" >>index.html x=$[x + 1] done echo "</body>" >>index.html echo "</html>" >>index.html |