Reading input from web into UNIX file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Reading input from web into UNIX file
# 1  
Old 07-26-2013
Reading input from web into UNIX file

Hi,

Could someone let me know how to read input from a web page into a unix file.

I am writing my script in bash shell in Solaris version.

Thanks in advance,
ayarlaga.
# 2  
Old 07-26-2013
Try wget or lynx -dump or w3m -dump
# 3  
Old 07-26-2013
@RudiC
Thank you for helping me... Unfortunately, none of these commands work in my shell...

---------- Post updated at 07:00 PM ---------- Previous update was at 06:42 PM ----------

@All
Just trying to be more clear...
I am trying to read data into unix files from a web form once the form is submitted.
Could someone please help me out on this?

Thanks in advance,
ayarlaga
# 4  
Old 07-26-2013
Quote:
Originally Posted by ayarlaga
@RudiC
Thank you for helping me... Unfortunately, none of these commands work in my shell...

---------- Post updated at 07:00 PM ---------- Previous update was at 06:42 PM ----------

@All
Just trying to be more clear...
I am trying to read data into unix files from a web form once the form is submitted.
Could someone please help me out on this?

Thanks in advance,
ayarlaga
I assume you are using PHP as the server-side language, am I correct? And what do you mean by "unix files"? Plain text files?
Please provide an example of a web form that you will use and exactly what you would like to achieve.
# 5  
Old 07-27-2013
even i was working on a front end that was developed using html. and i needed the form data to be passed as parameters to the unix shell script. for this purpuse i did it using a perl script since i didnot get any way of calling the shell script from html directly. so your form data 1st goes to the perl script and from the perl script i was sending it to the shell script.
# 6  
Old 07-27-2013
Quote:
Originally Posted by Little
for this purpuse i did it using a perl script since i didnot get any way of calling the shell script from html directly.
Perl, PHP, or sh, it makes no difference; an HTTP server using CGI always passes the submitted data via the environment.

Regards,
Alister
# 7  
Old 07-27-2013
Quote:
Originally Posted by alister
Perl, PHP, or sh, it makes no difference; an HTTP server using CGI always passes the submitted data via the environment.

Regards,
Alister
can i directly call the shell script from a html page when a submit button is called bypassing the perl script?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

User input while reading from a file

I am not able to capture the user input in this script(bash).There is prompt for user input.Could some one help me capture user input while reading afile? while read line do echo "$i" path1=$line path2=`echo $line|sed s/new_dir/old_dir/` echo "Do you want to replace?";... (4 Replies)
Discussion started by: parijat guh
4 Replies

2. UNIX for Dummies Questions & Answers

Help in reading the date from the input file name

Hi, I need to read the date from the input file. The format of the input file is as follows: a_b_c_yyyymmdd.txt I need to read the date(yyyymmdd) part from the name of the input file. Would really appreciate if someone can help me in this regard Thanks a lot. (1 Reply)
Discussion started by: Sunny_teotia
1 Replies

3. Shell Programming and Scripting

awk- reading input file twice

Hello, I've been trying to come up with a solution for the following problem; I have an input file with two columns and I want to print as an output the first column without any changes but for the second column, I want to divide it by its last value. Example input: 1 9 2 10 3 11 4 12 5... (14 Replies)
Discussion started by: acsg
14 Replies

4. Shell Programming and Scripting

Reading from a File and Using as an Input variable

I need to know how the the string constant from Input File should be read and provide as input data for the script . INPUT FILE CONST VARIABLE myname=/root/dir/syslog/myname1 myname=/root/dir/syslog/myname2 myname=/root/dir/syslog/myname3 urname=/root/dir/syslog/urname1... (6 Replies)
Discussion started by: baraghun
6 Replies

5. UNIX for Dummies Questions & Answers

Intermittent problem reading from an input file.

First of all thanks to all for the good post, and the great site. I'm a noob, but I've been able to learna a lot by checking past posts. I haven't been able to make sense of a problem that I've been working on for a while, hopefully someone can help me out. The script I wrote telnets into... (7 Replies)
Discussion started by: Wallygooo32
7 Replies

6. Shell Programming and Scripting

Reading specific contents from 1 input files and appending it to another input file

Hi guys, I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help. I have 2 input files (example given below) Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies

7. Shell Programming and Scripting

reading input from a file

I am trying to read input for a C program (that expects input from the user) from a file using the shell command: progname < filename but it seems that the program considers the char '<' as the first input, hence causing an "error" in my program. I checked it with another program and it... (2 Replies)
Discussion started by: nadbar
2 Replies

8. UNIX for Dummies Questions & Answers

reading web page source in unix

is there a command that allows you to take a url and grab the source code from the page and output it to stdout? i want to know because i want to grab a page and pass it thru another program to analyze the page. any help would be appreciated thanks (3 Replies)
Discussion started by: jaymzlee
3 Replies

9. Shell Programming and Scripting

Help reading an input file in KSH

First I' d like to say you guys are awesome. :) I have a word document that I cut and paste into Textpad and it removed all the fancy formatting which is fine with me. I WinScp'd it to the box and and called it inputfile.txt. Opened it in vi and don't see any special characters or stuff that... (2 Replies)
Discussion started by: zilla30066
2 Replies

10. Shell Programming and Scripting

Script for reading an input file

#!/bin/sh rpt="/export/home/legato/rpt_offsite"/test_eject.tape cat <$rpt while read line do echo $line perform routine done I am trying to read the contents of this file line by line and perform a routine for each line read. The file contents are numbers.. What is wrong with my... (1 Reply)
Discussion started by: gzs553
1 Replies
Login or Register to Ask a Question