cat > /var/lighttpd/var/www/domain/htdocs/test.php << "EOF" EOF cat > /var/lighttpd/var/www/domain/htdocs/test.pl << "EOF" #!/usr/bin/perl print "hello world!\n" EOF chmod 755 /var/lighttpd/var/www/domain/htdocs/test.pl