How to get values from href in HTML to sh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to get values from href in HTML to sh
# 1  
Old 10-10-2012
Question How to get values from href in HTML to sh

Hi,
This is a part of my code:

Code:
case "$1" in
home)
        echo '<h2> Select a student: </h2>'
        echo '<br>'
        for stunum in $(ls ./)
        do
            echo "<a href=edit?numeric_stu=$stunum>`sed -n 1p ./$stunum/info`</a>"
             echo '<br>'
        done
edit)
    echo '<html><body>'
    echo '<h2> Edit a student: </h2>'
    echo $_GET['numeric_stu']

Then in the case of $1 in edit, how do I get the value of numeric_stu from the href in home) ? My solution in the code doesn't work, it just prints [numeric_stu]
# 2  
Old 10-10-2012
What input do you have, and what output do you want?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Create HTML with Header and assign values

Hi All Below is the output i have from my code 10.106.86.93 A1,A2,A2,A3,A3,A4,A5,A6,B1,B2,B3,B4,B5,B5,B6,B6,C1,C1,C2,C2,C3,C3,C4,C4,C5,C5,C6,D1,D2,D3,D4,D5,D6,D6 3 Need to create a html with header and for the last value (3) if it is 3 then it should print ok, if 4 then print NotOk ... (4 Replies)
Discussion started by: Snehasish
4 Replies

2. Shell Programming and Scripting

Script that gathers specific values from files and puts it into HTML to send e-mail

Hi All, Sorry for long topic here. So the drill goes like that, I need a script which gathers different values from different files/locations. A_CT=`cat a.dat | awk -F'|' '{print $1}' >> report.txt` B_CT=`cat b.dat | awk -F'|' '{print $3}' >> report.txt` C_CT=`cat c.dat | awk -F'|'... (4 Replies)
Discussion started by: shivakid
4 Replies

3. Shell Programming and Scripting

How to remove the values inside the html tags?

Hi, I have a txt file which contain this: <a href="linux">Linux</a> <a href="unix">Unix</a> <a href="oracle">Oracle</a> <a href="perl">Perl</a> I'm trying to extract the text in between these anchor tag and ignoring everything else using grep. I managed to ignore the tags but unable to... (6 Replies)
Discussion started by: KCApple
6 Replies

4. UNIX for Advanced & Expert Users

Mutt for html body and multiple html & pdf attachments

Hi all: Been racking my brain on this for the last couple of days and what has been most frustrating is that this is the last piece I need to complete a project. There are numerous posts discussing mutt in this forum and others but I have been unable to find similar issues. Running with... (1 Reply)
Discussion started by: raggmopp
1 Replies

5. Shell Programming and Scripting

UNIX Env values in HTML file

Hi, I am sending 'mailx' one file.html from unix, and i want to put the field values from the unix environment.. like. <p><input type="text" name="name" value="Your name" /></p> in thin i want to put value "Your name" as let's say $HOME, can this be possible? If yes..can anyone please... (1 Reply)
Discussion started by: jaiankur
1 Replies

6. Shell Programming and Scripting

Replacing variable values in html tags

Hi please help me with this . I have a file test.txt with following content $cat test.txt <td>$test</td> <h2>$test2</h2> and I have a ksh with following content $cat test.ksh #!/bin/ksh test=3 test2=4 while read line do echo $line done < test.html I am expecting the output as (4 Replies)
Discussion started by: panduandpavan
4 Replies

7. Shell Programming and Scripting

sed:find url between <a href=" and ".*</a>

I am trying to extract the url between the anchor tag of html <a href="http://unix.com">Unix</a> The urls like above are saved in a file named url_file sed :\<a.href=\"\(.*\)\"\>.*\<\/a\>:\1:p url_file The above sed command says no match. Where is the problem I am unable to... (2 Replies)
Discussion started by: hiten.r.chauhan
2 Replies

8. Web Development

Help with passing HTML values in to JavaScript

Not sure if this is the right place to ask this but here goes. I am creating a cheat sheet for co-workers. The concept is that you pick wire size and conduit size and the amount of wires that will fit is displayed. I haven't used alot of drop downs and can't quite figure out the way the get id... (3 Replies)
Discussion started by: zero3ree
3 Replies

9. Red Hat

Send HTML body and HTML attachment using MUTT command

Hi there.. I need a proper "mutt" command to send a mail with html body and html attachment at a time. Also if possible let me know the other commands to do this task. Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies

10. UNIX for Advanced & Expert Users

shellinabox/html help to insert a keypress with an html button

I am trying to use shellinabox as a terminal emulator. Everything is working except there seems to be no way to simulate an F14 button press in shellinabox. I am already embedding shellinabox in an html page so Im am wondering if there is a way to make an html/js button that will pass F14 to the... (0 Replies)
Discussion started by: syadnom
0 Replies
Login or Register to Ask a Question