Execute command and show result in web page


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Execute command and show result in web page
# 1  
Old 09-02-2018
Execute command and show result in web page

Hi everyone,

I have two question

1- I want to execute command in shell and after execution result show in a web server. (kind of making UI )
e.g.

in shell
Code:
root ~: show list

item1
item2
item(n)

in web server

in a page draw a table and show those items in it
Code:
no    |   name
----------------

  1    |   item1
  2    |   item2
 (n)   |   item(n)

2- do you have any suggestion for a light web server that run without dependency and does not need to installation?

Thanks,

Last edited by indeed_1; 09-03-2018 at 12:26 AM..
# 2  
Old 09-03-2018
node.js is popular when programming in Javascript.

Node.js

Or, you can use something like Visual Studio Code and install a lightweight web server plugin (which also uses node.js).

Visual Studio Code - Code Editing. Redefined
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Search a multi-line shell command output and execute logic based on result

The following is a multi-line shell command example: $cargo build Compiling prawn v0.1.0 (/Users/ag/rust/prawn) error: failed to resolve: could not find `setup_panix` in `human_panic` --> src/main.rs:14:22 | 14 | human_panic::setup_panix!(); | ... (2 Replies)
Discussion started by: yogi
2 Replies

2. What is on Your Mind?

The Return of the Show Post Page

You may recall we used to have a "Show Post" link in each post that referenced the post and had a link to this post in page. I am going to bring back this feature and and renovate the page: https://www.unix.com/members/1-albums215-picture1013.png So that page has a "Under Renovation"... (1 Reply)
Discussion started by: Neo
1 Replies

3. Shell Programming and Scripting

awk to find the avg of every 3 rows but only show last result?

Hi, I've got as far as this: awk '{sum+=$1}(NR%3==1){avg=sum/3; print avg}' input.txt Input it: 0.1 txt txt 0.2 txt txt 0.3 txt txt So, the I get the results: 0.0333333 0.133333 0.2 (8 Replies)
Discussion started by: JohnnyEnglish
8 Replies

4. Shell Programming and Scripting

Execute unix command from an html page in windows

i have a problem situation, where i have a html file say click.html. i have a button "ls" in that html page. i run this html file in windows....Now say if i click that "ls" button it must connect to the unix server and execute ls and return the results back to html page in windows. can anyone tell... (8 Replies)
Discussion started by: niteesh_!7
8 Replies

5. Shell Programming and Scripting

Use grep result to execute next command

Hi I am trying to run 2 servers using a script one after the other. I start the first one: run.sh -c servername >> jboss_log.txt & Then I have to wait until I see Started message in the log file before I launch the other server. I can't use sleep because I am not sure how long it'll... (5 Replies)
Discussion started by: iririr
5 Replies

6. UNIX for Dummies Questions & Answers

how to use find commnad to show only path of the result

Hello all say i like to find files i do : find . -name "*.txt" but if i like to find ( and print out ) only the path's where the files are ( the *.txt files ) what can i add to the find command ? (1 Reply)
Discussion started by: umen
1 Replies

7. Shell Programming and Scripting

Show result only if number is greater then

Hello all Im trying to write one liner that will show me results only if the result of the expression is greater then 0 For example: I do : find . -name "*.dsp" | xargs grep -c SecurityHandler the result are : ./foo/blah/a.dsp:0 ./foo/blah1/b.dsp:1 ./foo/blah2/c.dsp:2... (1 Reply)
Discussion started by: umen
1 Replies

8. Shell Programming and Scripting

Want to show files on web page

hello Unix guru i want to show performance results on my internal website . We are manitaing the site through Wiki . I have to add new page in that . can someone help me to write shell script for that .. i want to display files datewise . my files names are starting with date . if... (3 Replies)
Discussion started by: deepa20
3 Replies

9. UNIX for Dummies Questions & Answers

Which comand to show the source code on a web page?

Hi folks! I am using MacOsX that runs freeBSD. Could you tell me what comand to type on the Unix Terminal to display on the terminal the source code of a certain web page? I think something like #<comand> http://www.apple.com will display on the terminal's window the html source code... (11 Replies)
Discussion started by: fundidor
11 Replies

10. UNIX for Dummies Questions & Answers

Display result one page at a time

hi how can i display the result on the screen one page at a time? say i search for .txt files and return the result on the screen one page at a time. (4 Replies)
Discussion started by: nickaren
4 Replies
Login or Register to Ask a Question