Results 1 to 4 of 4

Thread: Simple for command syntax, programming?

  1. #1
    Join Date
    Dec 2006
    Beans
    61

    Simple for command syntax, programming?

    I was hoping someone could give me advice or maybe exact answer for what I need. Also this isn't directly associated with ubuntu.

    I use cygwin on XP and I am trying to download content of more than one page. http://www.odv-zb.si/odvetnik.aspx?id=numbers So there are exactly 1197 pages that I need to get their content. I tried with this two commands:

    1) for i in `jot 1197 1` ; do wget http://www.odv-zb.si/odvetnik.aspx?id=$i ; done
    But there was error: HTTP request sent, awaiting response... 500 < No datra record is available. For more information about this event, see ISA server Help. >

    2) for ((i=1;i<296;i++)); dowget http://www.odv-zb.si/odvetnik.aspx?id=$i ; done
    But there was error: bash: syntax error near 'd'

  2. #2
    Join Date
    Jul 2005
    Location
    2 exits past crazy
    Beans
    4,222
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: Simple for command syntax, programming?

    Code:
    for i in $(seq 1 1197)
    do
    wget http://www.odv-zb.si/odvetnik.aspx?id=$i
    done
    Edit: If the $() expansion doesn't work under cygwin try
    Code:
    for i in `seq 1 1197`

  3. #3
    Join Date
    Dec 2006
    Beans
    61

    Re: Simple for command syntax, programming?

    TNX firs one worked just fine and while I'm here can u give me any directions for that kinda "programming" ? tnx
    Last edited by frojnd; June 20th, 2007 at 08:27 AM.

  4. #4
    Join Date
    Jul 2005
    Location
    2 exits past crazy
    Beans
    4,222
    Distro
    Lubuntu 12.10 Quantal Quetzal

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •