What is lynx?

Discussion in 'Mac Apps and Mac App Store' started by dutchnewbie, Jun 19, 2012.

  1. dutchnewbie macrumors regular

    Joined:
    Apr 22, 2012
    Location:
    The Hague - The Netherlands
    #1
    Hi,

    I see that some geeklets require lynx but what is that and is it standard installed?

    for example here is a code i found
    Code:
    lynx -dump http://printer.wunderground.com/cgi-bin/findweather/hdfForecast?query=17552|awk '/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'
    lynx -dump http://printer.wunderground.com/cgi-bin/findweather/hdfForecast?query=17552|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'
     
  2. tersono macrumors 68000

    tersono

    Joined:
    Jan 18, 2005
    Location:
    UK
  3. dutchnewbie thread starter macrumors regular

    Joined:
    Apr 22, 2012
    Location:
    The Hague - The Netherlands
    #3
    ahh okay and geektool uses that to display specific data?
     
  4. pitaya macrumors member

    Joined:
    Jun 17, 2012
    #4
    Almost. It's being used, with awk, to obtain and extract the data. awk is a command line program and a programming language used for working with text. The -dump flag tells lynx to output the webpage to what's called it's standard output. the " | " connects this to the awk standard input.

    wunderground is having an internal server error at the moment, but in the 2nd case awk will print out the 2nd through 10th field on lines that contain "Cond" but not "Fore":

    Code:
    > echo "Cond Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve" |awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'
    Two Three Four Five Six Seven Eight Nine Ten
    >
    > echo "Cond Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Fore" |awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }'
    >
    
    edit: and lynx doesn't seem to be installed. look into macports or fink
     
  5. adildacoolset macrumors 65816

    Joined:
    Sep 5, 2011
    Location:
    Lusaka, Zambia(If you know where it is)
    #5
    Lynx– a wild cat with yellowish-brown fur (sometimes spotted), a short tail, and tufted ears, found chiefly in the northern latitudes of North America and Eurasia.
     
  6. dutchnewbie thread starter macrumors regular

    Joined:
    Apr 22, 2012
    Location:
    The Hague - The Netherlands
    #6

    Attached Files:

  7. pitaya macrumors member

    Joined:
    Jun 17, 2012
    #7
    Follow the link that tersono posted and you'll find a few download links.

    http://lynx.isc.org/lynx2.8.7/lynx2.8.7.tar.bz2

    You probably don't have a compiler installed though. If you follow macports installation instructions it'll guide you through installing Xcode, but it's in the app store.
     

Share This Page