Fish has a wrapper for `bc` called `math`.
That said, invoking outside programs to do simple variable incrementing is
incredibly slow. If you need a monotonically-incrementing sequence of numbers,
consider using `seq`:
for i in (seq 1 9)
wget www.someurl.com/$i
end
On Jul 10, 2012, at
fish doesn't do math itself, unlike bash with its (( )) syntax. In
this case it's probably easiest to use expr in a command substitution:
> set x 0
> set x (expr $x + 1)
> echo $x
1
You might also consider bc or even dc, if you like RPN.
—Tom
On Tue, Jul 10, 2012 at 2:33 PM, Patrick wrote:
>
Sorry for my poorly worded email
I missed the increment part that I am particularly mixed up about
set $x=$x+1
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threa
I can set the value of x to 1 but I can't figure out who to do this:
function scrape
set x 1 ;
while x<10;
wget www.someurl.com/$x ;
end ;
end
Sorry for the dumb question-Patrick
--
Live Security Virtual Conference
E
just another thing:
you talk about "subshell", but that term is used only 3 times in all
the documentation... "command substitution" seems to be the more used
term
what is the official policy? should we refer to it as the first or the
latter? if either, I think the documentation should be updated
On 10 July 2012 19:17, Dario Bertini wrote:
> I was about to add documentation for the echo builtin... but then I
> realized that it has already been written and it's there in my local
> checkout, so apparently even the online documentation is a bit
> outdated:
> http://ridiculousfish.com/shell/us
I've done 2 very small pull requests:
https://github.com/fish-shell/fish-shell/pull/220
https://github.com/fish-shell/fish-shell/pull/221
I was about to add documentation for the echo builtin... but then I
realized that it has already been written and it's there in my local
checkout, so apparentl