Web Technology


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Web Technology
# 1  
Old 09-22-2011
Web Technology

Hi Experts,

This may sound stupidity.....anyhow....let me ask the doubt, Even though shell is just a scripting language, can anyone tell me, whether web pages can be created with embedding some concepts.

In any other scripting language, whether web pages can be created. If so, suggest me in which scripting it is possible and also tell me some guidelines to start with it....


Thanks,
Newbie.........
# 2  
Old 09-22-2011
Dynamic web pages can be created with almost any (scripting) language, as long as the web server allows you to execute the files. Most prevalent at the moment is PHP, but there's also Perl, Python, Ruby, Bash, Smalltalk, LISP, ...

If you want an example of how to write something like this take a look at a blog engine written in bash.
# 3  
Old 09-22-2011
Thanks for your help!!!

Just now checked that URL.....its something like ongoing open source project.......am a newbie....so, can u suggest me something like very simple web page kind of sort....or else, can u guide me how to start doing that or what are the commands which can be used to do the same.


Thanks again,
Newbie..........
# 4  
Old 09-22-2011
There's more to it that just writing a script, you'll also have to make sure that the web server allows execution of scripts.

But the most simple example that I can come up with:
Code:
#!/bin/bash

echo "Content-Type: text/html"
echo

echo "
<html>
  <head>
    <title>Test</title>
  </head>
  <body>
    <p>The time is now $( date )</p>
  </body>
</html>
"

Same thing in Perl (for example)
Code:
#!/usr/bin/perl

print "Content-Type: text/html\n\n";

$time = localtime;
print <<"EOF";
<html>
  <head>
    <title>Test</title>
  </head>
  <body>
    <p>The time is now $time</p>
  </body>
</html>
EOF

# 5  
Old 09-22-2011
I don't mean to nitpick, but since the response is meant to be instructional, I thought I'd mention it.

Those line endings are incorrect. HTTP headers should be terminated by \r\n. The client will often be liberal and accept \n (especially when it's a full-blown browser), but it's not required to.

Regards,
Alister
# 6  
Old 09-23-2011
Thanks for the reply.

Can anyone suggest me some basic tutorial, where I can learn to start scripting by myself......as am very new to UNIX and SHELL.......am not sure what are all possible in shell with oracle.....and i havent came accross any GUI kind of applns in SHELL with ORACLE......kindly, help me out.


Thanks,
newbie.......
# 7  
Old 09-23-2011
Quote:
Originally Posted by kritibalu
Thanks for the reply.

Can anyone suggest me some basic tutorial, where I can learn to start scripting by myself......as am very new to UNIX and SHELL.......am not sure what are all possible in shell with oracle.....and i havent came accross any GUI kind of applns in SHELL with ORACLE......kindly, help me out.


Thanks,
newbie.......
Hello!

Your question(s) could easily be answered by searching the Internet with Google. Google is your friend Smilie

Per forum rules, and the benefit of all users, please search the network and the forums before posting a question.

You can easily search the forums using our internal Google search engine or our advanced internal search engine. You can also search our huge UNIX and Linux database by user generated tags or search the database for unanswered questions and provide an answer.

Thank you.

The UNIX and Linux Forums
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Solaris

Java web console Vs Web-Based Enterprise Management(WBEM)

Java web console Vs Web-Based Enterprise Management(WBEM) 1. I like to understand the difference in purpose of using java web console and Web-Based Enterprise Management (WBEM) 2. As per CIS benchmark, both of them has to be disabled when not used for increased security. Solaris admin(s) -... (0 Replies)
Discussion started by: cyberidude
0 Replies
Login or Register to Ask a Question