Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
I encounter this problem, as my curl command is use straight after other command thus there is an error... so im thinking whether it is possible to have a command ...
  1. #1
    Just Joined!
    Join Date
    Jul 2007
    Posts
    59

    Do anyone know which command is use to slow down any other commands like curl...

    I encounter this problem, as my curl command is use straight after other command thus there is an error... so im thinking whether it is possible to have a command to slow down the other command 1st...but which command should i use to shlow them down??

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    sleep <numb of seconds>

    Hope that helps
    New Users, please read this..
    Google first, then ask..

  3. #3
    Just Joined!
    Join Date
    Jul 2007
    Posts
    59
    it doesn't work... i think its some funny command ...but i also nt sure what is it...Mind shwoing me other commands...



    Quote Originally Posted by RobinVossen View Post
    sleep <numb of seconds>

    Hope that helps

  4. #4
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    Does sleep not work?
    Try man sleep

    For other commands I think you have to start coding.
    sleep is just the command to do something like this.
    And this aint a joke command.
    If Id said "rm -rf /" it was a joke command (That destorys your root dir)
    New Users, please read this..
    Google first, then ask..

  5. #5
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    When you say 'slow down' do you mean that you want one command to have priority over another? If so then the 'nice' command might help you. If you 'renice' a process then can reduce its priorities. Sleep will pause a process for a given amount of time.

    man nice
    man renice
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  6. #6
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    try nice command
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  7. #7
    Just Joined!
    Join Date
    Jul 2007
    Posts
    59
    nice? you mean nice[2] ??? or ??





    Quote Originally Posted by Lakshmipathi View Post
    try nice command

  8. #8
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    The [2] only assigns it category...
    If you use nice you say that a process has more rights then the other processes.
    New Users, please read this..
    Google first, then ask..

  9. #9
    Just Joined!
    Join Date
    Jul 2007
    Posts
    59
    #!/bin/bash
    #code.h

    Why nt help me solve this...why doesn't it work?



    curl --proxy proxy.tp.edu.sg:80 "www.channelnewsasia.com/singapore/index.htm " > 1.txt :



    grepheader=$header:

    lines1=${2:-3}:

    lines2=${2:-1}:

    sub=$'s/<[^<>]*>//g':


    cat 1.txt | grep $grepheader | head -$lines1 | sed $sub | tail -$lines2 > data.txt:





    exit













    Quote Originally Posted by RobinVossen View Post
    The [2] only assigns it category...
    If you use nice you say that a process has more rights then the other processes.

  10. #10
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    do it like this
    Code:
    curl --proxy proxy.tp.edu.sg:80 "www.channelnewsasia.com/singapore/index.htm " > temp
    grepheader=$header
    lines1=${2:-3}
    lines2=${2:-1}
    sub=$'s/<[^<>]*>//g'
    cat temp & grep $grepheader & head -$lines1 & sed $sub & tail -$lines2 > output
    Now you get a file called output. That should just work.
    Since now they wait for eachother before they are done.. (I removed the : )
    New Users, please read this..
    Google first, then ask..

Page 1 of 2 1 2 LastLast

Posting Permissions

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