Tag Info

New answers tagged

1

I once wrote a perl script that ran ifconfig and used the bytes display to figure out the average bandwidth consumed during the poll period (5 seconds or whatever). So, assuming you know what the rate curl is currently running at, you can deduct that speed over the time period (10 k times 5 seconds) and figure out if there is much else going on. Then ...


1

No, because curl is not interactive. But both wget and curl have "continue" switches. So you can restart them from the point where you left with new limit rate settings. The following should continue from the point you left. curl -C wget has the similar switch wget -c It's also possible to limit the traffic rate using the tc and netem tools but this ...


0

2 years later I will throw this tidbit in, while wget and curl are not interactive, at least wget (and possibly curl but i do not know for sure) has the -c switch. So if you need to change your speed in the middle of a download and you presumably used the -c switch with the --limit-rate=x (which stands for continue from where I left off downloading earlier, ...


3

The problem is that curl expects some normal terminal settings and zle doesn't expect you change the terminal settings. So you can write it instead: _check-gmail() { zle -I ( s=$(stty -g) # safe zle's terminal setting stty sane # sane settings for curl curl -u username --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' ...


0

One approach would be to prompt the user prior to running your _check-gmail function so that your script has the password in hand, in a variable. Then you'd pass the password variable into your function so that the curl command can make use of it. For example: $ tst_fun () { echo "Parameter #1 is $1"; } $ tst_fun "my_pass" Parameter #1 is my_pass $ To ...



Top 50 recent answers are included