Sponsored Content
Top Forums Programming Html form to submit data to bash script Post 303000803 by apmcd47 on Thursday 20th of July 2017 04:35:51 AM
Old 07-20-2017
You are expecting the form elements user and passwd to be converted to shell variables and exported to your scripts environment before calling it. It doesn't happen that way (unless there is an apache module for that).
You need something like:
Code:
if [ "$REQUEST_METHOD" = "POST" ]
then
   tr '&' '\n' > /tmp/mycgi$$
   echo >> /tmp/mycgi$$
fi
if [ "$REQUEST_METHOD" = "GET" ]
then
   printf "%b\n" "${QUERY_STRING//&/\\n}" > /tmp/mycgi$$
fi
while read line
do
   line=${line//+/ }
   kword=${line%=*}
   val=${line#*=}
   # deal with keyword/value pair here
done < /tmp/mycgi$$
rm /tmp/mycgi$$

Andrew
These 2 Users Gave Thanks to apmcd47 For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PHP Help with Form Submit

Hi, I have a custom HTML form that has a couple radio buttons and a text field that requires a number. I'm not a php programmer and could use some help with putting together php code to calculate a total based on the radio button selection and the text field number. ... (3 Replies)
Discussion started by: nck
3 Replies

2. Shell Programming and Scripting

using wget to submit a form on linksys router

I'm trying to use wget to submit a form. I have tried to dig out what is actually being "posted" and where, using tamperdata (see below). http://ubuntuforums.org/attachment.php?attachmentid=109123&d=1239224127 Here is my wget command: wget --http-user=xyz --http-password=xyz... (1 Reply)
Discussion started by: mike909
1 Replies

3. UNIX for Dummies Questions & Answers

Bash script to insert data into an html table

hi, I need to create a bash shell script which picks up data from a text file and in the output file puts it into an html made table. I have to use sed and awk utilties to do this the input text file will contain data in the format: job name para1 para2 para3 para4 para4 1 ... (1 Reply)
Discussion started by: intern123
1 Replies

4. Shell Programming and Scripting

Bash shell script that inserts a text data file into an HTML table

hi , i need to create a bash shell script that insert a text data file into an html made table, this table output has to mailed.I am new to shell scripting and have a very minimum idea of shell scripting. please help. (9 Replies)
Discussion started by: intern123
9 Replies

5. Shell Programming and Scripting

Using cURL to submit a post form

I am trying to write a shell script to use curl in order to automate downloading data from a website. The URL with the post form is here: http://try-db.org/de/InfoBySpecies.php . I have a list of about 1800 different species I want to check. For Example, choose the first species and use the... (2 Replies)
Discussion started by: hansvg
2 Replies

6. Shell Programming and Scripting

Can't submit a form.

hello my script is submitting POST-data to a site (its not my first script, i've done these before many times (include parsing scripts) but this one is tough) so the problem is i'm submitting a form with firefox and in firebug i see WHAT exactly i'm submitting then when i do EXACTLY the... (28 Replies)
Discussion started by: tip78
28 Replies

7. UNIX for Dummies Questions & Answers

How to submit form on an php webpage from command line?

Hello, i have page domain.com/form.php the form fields on form.php are named: name=ipaddress name=port and submit button is named: submit i want to ask how the linux command will look like to submit the form filled with: ipaddress: 127.0.0.1 port: 80 I tried various curl and... (5 Replies)
Discussion started by: postcd
5 Replies

8. Shell Programming and Scripting

Exec submit form in bash script

Hi All, I'm new in forum. Many congratulations to everyone for all work. I'm not an expert in bash script I've a problem with a sh file. The sh file run every t minuts and it read data from txt file and then compile form. Finally, the user, from the web browser click on send. The script... (0 Replies)
Discussion started by: Herbert
0 Replies

9. Shell Programming and Scripting

Trying to submit web form content to a shell script

Hi I was hoping some one could help me with a problem I have. I am trying to collect some information from a web form and save it to a text file. I found an example on this site that is sort of what I am trying to accomplish, the shell script bellow should echo the input back to the browser... (0 Replies)
Discussion started by: Paul Walker
0 Replies
uucpd(1M)																 uucpd(1M)

NAME
uucpd - UUCP over TCP/IP server daemon SYNOPSIS
DESCRIPTION
is the server for supporting UUCP connections over TCP/IP networks. is invoked by (see inetd(1M)) when a UUCP connection is established (that is, a connection to the port indicated in the "uucp" service specification; see services(4)), and executes the following protocol: 1) The server prompts with "login:". The process at the other end must supply a username. 2) If the username refers to an account without a password, the server then prompts with "Password:". The process at the other end must supply the password for that account. The connection is dropped if one or more of the following conditions occurs: o The username is not valid. o The username is valid but refers to an account that does not have as its login shell. o The password authentication fails due to an incorrect password to that account. o The password authentication fails due to the settings in Refer to the security(4) manpage for detailed information on config- urable parameters that affect the password authentication. If the connection is successful, is run (see uucico(1M)). Entries are made in traceable with the and commands (see who(1) and last(1)). Protocol Restriction Only the "g" protocol for is supported. DIAGNOSTICS
All diagnostic messages are returned on the connection, after which the connection is closed. An error occurred while reading the username. An error occurred while reading the password. The username or the password is invalid or the user's login shell for this account is not WARNINGS
On Trusted Systems, prohibits to start if any of the following conditions are true : o The login account is locked (several causes). o The current time does not match existing time-of-day restrictions for this account. Under such conditions, will return the message to the connection. The connection is then dropped. HP-UX 11i Version 3 is the last release to support trusted systems functionality. AUTHOR
was developed by the University of California, Berkeley and HP. FILES
configuration file for inetd optional security file for inetd service name data base login data base security defaults configuration file SEE ALSO
inetd(1M), uucico(1M), pam(3), updatebwdb(3C), security(4), services(4). uucpd(1M)
All times are GMT -4. The time now is 01:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy