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 3:38 PM, Tom Most <[email protected]> wrote:
> 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 <[email protected]>
> 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
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Fish-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/fish-users
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Fish-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fish-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users