Sponsored Content
Top Forums Shell Programming and Scripting Converting html table data into multiple variables. Post 302399643 by domsmith on Monday 1st of March 2010 06:09:58 AM
Old 03-01-2010
Sorry about that

Attached is what I have cut from the html page

Code:
Monday
March 1 2010

<table width='100%' border='1' cellspacing='0' cellpadding='3'>        

<tr>
            
<th>Booking #</th>
<th>Client / UOS</th>
<th>Day</th>
<th>Times</th>
<th>Dates</th>
<th>Frequency</th>
<th>Capacity</th>
<th>Purpose</th>
<th>&nbsp;</th>
</tr>
                        
<tr>
<td>
                                        
<a href='bookingDetails.jsp?tempViewSingle=true&bookingId=595897'>595897</a>
</td>
                                    
                                        
<td><a href="https://www.unix.com/ttLabel.jsp?academicYear=2010&sessionId=1&labelString=LAWS1022&campusId=1">LAWS1022</a></td>
                                        
<td>MON</td>
<td>10:00 - 12:00</td>
<td>1 Mar 10 - 12 Apr 10</td>
<td>Weekly</td>
<td>20</td>
<td>Seminar</td>
                    
<td>
<a href='booking.jsp?level2=Edit&bookingId=595897'>Edit</a>
                        
&nbsp;</td>
                    
</tr>
                        
<tr>
<td>
<a href='bookingDetails.jsp?tempViewSingle=true&bookingId=595914'>595914</a>
</td>
                                        
                                        
<td><a href="https://www.unix.com/ttLabel.jsp?academicYear=2010&sessionId=1&labelString=LAWS1013&campusId=1">LAWS1013</a></td>
                                        
<td>MON</td>
<td>12:00 - 13:00</td>
<td>1 Mar 10 - 12 Apr 10</td>
<td>Weekly</td>                    
<td>20</td>
<td>Seminar</td>
<td>
                        
<a href='booking.jsp?level2=Edit&bookingId=595914'>Edit</a>
&nbsp;</td>
                    
</tr>
                        
<tr>
<td>
                                        
<a href='bookingDetails.jsp?tempViewSingle=true&bookingId=595900'>595900</a>
</td>
                                        
<td><a href="https://www.unix.com/ttLabel.jsp?academicYear=2010&sessionId=1&labelString=LAWS1022&campusId=1">LAWS1022</a></td>
                                        
<td>MON</td>
<td>14:00 - 16:00</td>
<td>1 Mar 10 - 12 Apr 10</td>
<td>Weekly</td>                    
<td>20</td>
<td>Seminar</td>
<td>
<a href='booking.jsp?level2=Edit&bookingId=595900'>Edit</a>
&nbsp;</td>
                    
</tr>
                        
</table>
<p>

Tuesday
March 2 2010

Basically each value between
Code:
<th> value </th><td> value </td>

is what I want to capture but sometimes the capacity column, frequency column or both columns are not always generated. So both the number of columns or number of rows can differ from day to day.

Last edited by domsmith; 03-01-2010 at 09:34 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting HTML data into a spreadsheet

Hi, I have a perl script that prints some data in the form of a table (HTML table) Now, I want to be able to convert this data into a report on an Excel sheet. How can I do this? Regards, Garric (4 Replies)
Discussion started by: garric
4 Replies

2. 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

3. 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

4. Shell Programming and Scripting

extract complex data from html table rows

I have bash, awk, and sed available on my portable device. I need to extract 10 fields from each table row from a web page that looks like this: </tr> <tr> <td>28 Apr</td> <td><a... (6 Replies)
Discussion started by: rickgtx
6 Replies

5. 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

6. Shell Programming and Scripting

awk -- Extract data from html within multiple tags as reference

Hi, I'm trying to get some data from an html file, but the problem is before it can extract the information I have multiple patterns that need to be passed through. https://www.unix.com/shell-programming-scripting/150711-extract-data-awk-html-files.html Is a similar problem. The only... (5 Replies)
Discussion started by: counfhou
5 Replies

7. Shell Programming and Scripting

Creating html table from data in file

Hi. I need to create html table from file which contains data. No awk please :) In example, ->cat file num1 num2 num3 23 3 5 2 3 4 (between numbers and words single TAB). after running mycode i need to get (heading is the first line): <table>... (2 Replies)
Discussion started by: Manu1234567
2 Replies

8. Shell Programming and Scripting

Input data of a file from perl into HTML table

Hi , I need an help in perl scripting. I have an perl script written and i have an for loop in that ,where as it writes some data to a file and it has details like below. cat out.txt This is the first line this is the second line. .....Now, this file needs to be send in mail in HTML... (2 Replies)
Discussion started by: scott_cog
2 Replies

9. Linux

Parsing - export html table data as .csv file?

Hi all, Is there any out there have a brilliant idea on how to export html table data as .csv or write to txt file with separated comma and also get the filename of link from every table and put one line per rows each table. Please see the attached html and PNG of what it looks like. ... (7 Replies)
Discussion started by: lxdorney
7 Replies

10. UNIX for Beginners Questions & Answers

Generate files and use csv data to replace multiple variables in a template

I have a source csv file consists of first field as variable name, and the rest are site-specific information (converted from excel file, where site -specific values in columns). I am trying to create a file for every site using a template and replace the multiple variables with values from the... (3 Replies)
Discussion started by: apalex
3 Replies
IRSEND(1)							   User Commands							 IRSEND(1)

NAME
irsend - basic LIRC program to send infra-red commands SYNOPSIS
irsend [options] DIRECTIVE REMOTE CODE [CODE...] DESCRIPTION
Asks the lircd daemon to send one or more CIR (Consumer Infra-Red) commands. This is intended for remote control of electronic devices such as TV boxes, HiFi sets, etc. DIRECTIVE can be: SEND_ONCE - send CODE [CODE ...] once SEND_START - start repeating CODE SEND_STOP - stop repeating CODE LIST - list configured remote items SET_TRANSMITTERS - set transmitters NUM [NUM ...] SIMULATE - simulate IR event REMOTE is the name of a remote, as described in the lircd configuration file. CODE is the name of a remote control key of REMOTE, as it appears in the lircd configuration file. NUM is the transmitter number of the hardware device. For the LIST DIRECTIVE, REMOTE and/or CODE can be empty: LIST "" "" - list all configured remote names LIST REMOTE "" - list all codes of REMOTE LIST REMOTE CODE - list only CODE of REMOTE The SIMULATE command only works if it has been explicitly enabled in lircd. -h --help display usage summary -v --version display version -d --device use given lircd socket [/var/run/lirc/lircd] -a --address=host[:port] connect to lircd at this address -# --count=n send command n times EXAMPLES
irsend LIST DenonTuner "" irsend SEND_ONCE DenonTuner PROG-SCAN irsend SEND_ONCE OnkyoAmpli VOL-UP VOL-UP VOL-UP VOL-UP irsend SEND_START OnkyoAmpli VOL-DOWN ; sleep 3 irsend SEND_STOP OnkyoAmpli VOL-DOWN irsend SET_TRANSMITTERS 1 irsend SET_TRANSMITTERS 1 3 4 irsend SIMULATE "0000000000000476 00 OK TECHNISAT_ST3004S" FILES
/etc/lirc/lircd.conf Default lircd configuration file. It should contain all the remotes, their infra-red codes and the corresponding timing and wave- form details. DIAGNOSTICS
If lircd is not running (or /var/run/lirc/lircd lacks write permissions) irsend aborts with the following diagnostics: "irsend: could not connect to socket" "irsend: Connection refused" (or "Permission denied"). SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory. lircd(8), mode2(1), smode2(1), xmode2(1), irrecord(1), irw(1), http://www.lirc.org. irsend 0.9.0-pre1 October 2010 IRSEND(1)
All times are GMT -4. The time now is 03:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy