473,425 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

how can create using shell script and develop the web page

11
How can create web page using shell script.......

Like web page like

winner of the month(given the input) = john
type of the prize(given the input)= gold

the given page like


winner of the month john
type of the prize gold

please help

bye
gupta
Jul 24 '08 #1
3 6050
Brosert
57
You probably need to provide a little more information...It's not immediately clear exactly what you want to do

Here are some helpers/ideas along the way....

Expand|Select|Wrap|Line Numbers
  1. #Read a variable
  2. read NAME
  3.  
  4. #output header1 html tag 
  5. echo "<h1> ${NAME} </h1>"
  6.  
  7.  
Piping your output to a file will help in creating a page - you will still need to open it through a browser...
It might be a lot of work, though, as you would need to create all the tags around it as well....you might want to read them from a pre-prepared file
Of course, you can call shell commands through PHP scripts on a web page - and have them output the result back to the php page being generated....

Post back with more info if I'm way off track with what you want to do....
Jul 24 '08 #2
gupta24
11
yes i want open file from browser and display the information what ever given the input in the web page itself

please help

gupta


You probably need to provide a little more information...It's not immediately clear exactly what you want to do

Here are some helpers/ideas along the way....

Expand|Select|Wrap|Line Numbers
  1. #Read a variable
  2. read NAME
  3.  
  4. #output header1 html tag 
  5. echo "<h1> ${NAME} </h1>"
  6.  
  7.  
Piping your output to a file will help in creating a page - you will still need to open it through a browser...
It might be a lot of work, though, as you would need to create all the tags around it as well....you might want to read them from a pre-prepared file
Of course, you can call shell commands through PHP scripts on a web page - and have them output the result back to the php page being generated....

Post back with more info if I'm way off track with what you want to do....
Jul 24 '08 #3
Brosert
57
You can do this a number of ways.
Basically (if I understand waht you want to do), you want to create a file from a script, and later open the information generated by that script in a browser.

There are probably at least two reasonably simple approaches
1) you could directly generate the HTML from the script - probably long and tedious
2) you could save the information to a temporary file, which may or may not contain some HTML formatting, and have a generic file (in say php) to create a page using the information in that file.

Probably what I would do, is redirect the output to a .csv file which would look something like (result.csv):

[code]
winner, John
prize, Gold
[code]

you then create a file which includes something like the following php (lottery.php) {I haven't made sure that works so their may be little oversights in it}:
Expand|Select|Wrap|Line Numbers
  1. <? 
  2. //Check File exists
  3. if(exists_file("result.csv'"))
  4. {
  5. //Open file for reading
  6.   $myfile=fopen("result.csv". "r");
  7.   //read the csvlines - note 1000 here is >= file length- may need to extend if you open bigger files 
  8.   while (($line = fgetcsv($myfile,1000,",")!=false)
  9.   {
  10.     echo "<h2>".$line[0]." is ".$line[1]."!!";
  11.   }
  12. }
  13. ?>
  14.  
Jul 24 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Nico | last post by:
I try to execute a shell command from ASP with: response.write("start") Set wshShell = CreateObject("WScript.Shell") wshShell.Run "notepad" Set wshShell = Nothing response.write("finished") ...
11
by: Paul D.Smith | last post by:
Can Python create a variable "on-the-fly". For example I would like something like... make_variable('OSCAR', 'the grouch'); print OSCAR; ....to output... the grouch
2
by: Mike John | last post by:
I am trying to use the shell object to send keys to the explorer browser to run the send page funcion. I am receiving the above error only when I put my html file in the web server...
4
by: Mark | last post by:
Hello, I'm trying to install an ASP.Net project using the command line (SDK tools & perhaps IIS Admin scripts?) Does anyone know of an automatic, command-line-driven way, to creat the ASP.Net...
13
by: Viken Karaguesian | last post by:
Hello everyone, Can anyone recommend a good online site to learn PHP? The W3Schools website is quite lacking - leaves much to be desired. I'm sure there are many places, but which ones are good?...
1
by: Aaron West | last post by:
Try this script to see what queries are taking over a second. To get some real output, you need a long-running query. Here's one (estimated to take over an hour): PRINT GETDATE() select...
4
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
Is there any way to create an instance of the control that is used by System.Drawing.Design.ColorEditor (i.e., the control that appears when you click on a color in a PropertyGrid)? I want to...
1
by: ksn2007 | last post by:
Hi All, I have to run a shell script from my php script and while shell script is running I have to do some other tasks in my php script.To run the shell script I am using ...
7
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.