Obvious Tip: Calling Windows "Calc" from Prompt

zzapper david@tvis.co.uk
Fri Aug 6 20:02:00 GMT 2004


On Fri, 6 Aug 2004 18:42:27 +0100,  wrote:

>> -----Original Message-----
>> From: cygwin-owner On Behalf Of zzapper
>> Sent: 06 August 2004 18:34
>
>> On Thu, 05 Aug 2004 22:53:20 +0100,  wrote:
>> 
>> You can also script bc
>> echo 2+4 | bc -l 
>
>
>  For the quickest command-line calculator, if you're using bash you can
>just use arithmetic expansion, e.g:
>
>dk@mace /davek> echo $(( 5 * 23 + 17 ))
>132
>dk@mace /davek>
>
>
DK
Fantastic, It always amazes how (at the risk sometimes of getting a right-royal slagging off) how a
pushing an idea in a NG, can bring forth so many good ideas and variants.

I had been using Win-Calc for years, but often had to repeat calculations (VaT etc) because I'd
already forgotten the result. However if you write it at the prompt with your echo idea, it's
sitting there in your history to be recalled-re-editted.

Well that's good-bye to yet another Win-App

echo "Thanx Dave Korn,"

zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s%s*%CyrnfrTfcbafbeROenzSZbbyranne%|:%s)[R-T]) )Ig|:norm G1VGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list