Geek Tool Shell Commands in HTML

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Geek Tool Shell Commands in HTML
# 1  
Old 02-02-2011
Geek Tool Shell Commands in HTML

I'm new around these parts but I figured I might as well ask something thats been bothering me for a while. I have a little HTML experience and really none at all with unix. I have been running a geektool-a preference pane that outputs shell commands onto the desktop for Mac. Recently I have been building a custom web browser start page.

I have been wondering if it would be possible for me to use some of the shell code that I use in geektool in the locally-stored browser startpage. For reference here is some of the code that I have been trying to get into the page, without success.

Code:
curl --user username:password http://www.rememberthemilk.com/print/username/7245324/ | grep -E '(<li>)' | sed -e 's/<[^>]*>//g' | sed -e 's/&nbsp\;//g' |  sed -e 's/&bull\;/*/g'

Any help would be greatly appreciated, thanks in advance.

Last edited by Scott; 02-02-2011 at 04:14 PM.. Reason: Moved to OSX forum with expiring (2 wks) redirect
# 2  
Old 02-02-2011
Without seeing the webpage we can't tell you how to extract data from it.
# 3  
Old 02-02-2011
Sorry, I thought it was just a more general question of how to show output from shell commands in html. But if it helps at all here is the site that I am trying to extract the original data from.

Code:
http://www.rememberthemilk.com/print/bgduncaniv/7245324/

# 4  
Old 02-04-2011
How to extract data depends entirely upon the website arrangement, which I still cannot see from that URL. There's not really a general-purpose answer since the data can be formatted so many different ways. Some sites even rely on javascript to display their content which pretty much rules out all automated retrieval and processing.

Maybe lynx --dump can do it in one swoop, but that tends to be ugly and makes it hard to tell which sections you want to keep and which you want to toss. And it doesn't support javascript of course.
# 5  
Old 02-07-2011
Ok I guess I'll try this one more time then.
Say I wanted to take the output from the script found at this location
Code:
http://dl.dropbox.com/u/49219/gmailgeneric.sh

and embed it into a custom browser start page in HTML. Any tips?
# 6  
Old 02-08-2011
Well, it has to be run on the server, if you were thinking of the client side. If you dump it in your webserver's cgi-bin directory you can execute it there, but that may not be too useful in that form You could run it in a PHP script easily:
Code:
<?php system("/path/to/executable.sh"); ?>

and from there adapt it to how you want.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help updating my AIX shell script that uses IBM tape tool.

I have a shell script that interfaces with our tape library using IBM's Tape Diagnostic tool called "itdt". The script does some basic stuff, it queries the tape library, loads tape to/from drive; it knows which inventory slot to pick the tape from based on SLOT=$(($BASESLOT + $TODAY)). The... (1 Reply)
Discussion started by: tmonk1
1 Replies

2. Shell Programming and Scripting

Need help updating my AIX shell script that uses IBM tape tool.

I have a shell script that interfaces with our tape library using IBM's Tape Diagnostic tool called "itdt". The script does some basic stuff, it queries the tape library, loads tape to/from drive; it knows which inventory slot to pick the tape from based on SLOT=$(($BASESLOT + $TODAY)). The... (10 Replies)
Discussion started by: c3rb3rus
10 Replies

3. Shell Programming and Scripting

Any shell or hack that makes the shell command line take vi commands?

basically i'm tired of hitting the left arrow a few dozen times when correcting a mistake or modifying a history command i'd like to use vim style key shortcuts while on the command line so that a 55 moves the cursor 55 places to the left... and i want all the other vi goodies, search of... (3 Replies)
Discussion started by: marqul
3 Replies

4. Shell Programming and Scripting

Giving automatic multiple Input to a tool from shell script

Hi, Please help me,its urgent. I have a tool that i want to run from a shell script. When we run the tool it will ask the user choice to add or delete. When user enter the choice it will then ask how many units he want to delete or add and will add or delete accordingly. Now I want to... (1 Reply)
Discussion started by: saket18@ymail.c
1 Replies

5. Shell Programming and Scripting

Run Shell Commands via HTML on a client machine

Hi guys, so, I have a server running an sqlite database which is accessed by many client machines working as hardware testers, whenever something fails and needs to be replaced the operator would have to enter the Serial Number of the part being replaced as well as some other data. and... (0 Replies)
Discussion started by: sx3v1l_1n51de
0 Replies

6. Shell Programming and Scripting

New tool for shell scripting

Hi All, It's quite long time....m comming to my favourite forum.. Can anyone suggest me good tool like eclipse for Java....do we have anything for Shell scripting..where n i can atlease prepare script...rather than typing all mistakes in Linux box :) Thanks Sha (1 Reply)
Discussion started by: Shahul
1 Replies

7. Shell Programming and Scripting

Shell Programing with awk Tool

I'm working on a program in with shell programming and it needs to be able to delete the contents of files in the Home directory on certain days of the week.(like tuesday). Can anyone help me with this? Thanks in advance, Taffy. (7 Replies)
Discussion started by: Taffy
7 Replies

8. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

9. Shell Programming and Scripting

Run shell commands via HTML webpage/button?

Hey guys, I got a issue here... we have a development box and a UAT box that our webmasters use, they do the webpage development on the development box and and save changed files to a particular directory on the dev machine. At a certain time of the day a cronjob kicks off and the... (3 Replies)
Discussion started by: zeekblack
3 Replies

10. Shell Programming and Scripting

How to run unix commands in a new shell inside a shell script?

Hi , I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell. So scenario is that - I need to have one shell script which is ran as a part of crontab - in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies
Login or Register to Ask a Question