*To*: debian-user@lists.debian.org*Subject*: Re: shell wrappers for trig and other mathematical functions*From*: Greg Wooledge <wooledg@eeg.ccf.org>*Date*: Wed, 2 Oct 2019 08:55:29 -0400*Message-id*: <[🔎] 20191002125529.GT28751@eeg.ccf.org>*Mail-followup-to*: debian-user@lists.debian.org*In-reply-to*: <[🔎] CAOphiz+_06DQtoP0NOzbR4BuvMu9oCpY79AFt5zHdYih9puquQ@mail.gmail.com>*References*: <[🔎] CAOphizJnMAXDnLRaMNRUGpC2A7W6S03nJGXb2Pgk53wF71WRzw@mail.gmail.com> <[🔎] bf98c73f-4937-1352-8664-538c89a37954@holgerdanske.com> <[🔎] CAOphiz+_06DQtoP0NOzbR4BuvMu9oCpY79AFt5zHdYih9puquQ@mail.gmail.com>

On Tue, Oct 01, 2019 at 09:18:13PM -0700, Dan Hitt wrote: > It does look like a way to quickly get values for sine (or any other > function in perl). > > However, i would like to dispense entirely with the 'perl -e' and 'print' > part. You can't. > I really would like stand-alone programs. Gods, no! You do not. Why on earth would you think you want a dedicated, stande-alone program for this?! > This would absolutely > minimize any typing, Oh, you just want to MINIMIZE TYPING. Then write a series of shell functions. wooledg:~$ sin() { perl -e 'print sin $ARGV[0], "\n"' "$1"; } wooledg:~$ sin 1 0.841470984807897 This is what shell functions are for. You can just drop the shell functions into your ~/.bashrc and then use them in every interactive shell thenceforth. I strongly recommend this approach over the aliases that were previously suggested, by the way. Functions are so much cleaner.

**Follow-Ups**:**Re: shell wrappers for trig and other mathematical functions***From:*Lee <ler762@gmail.com>

**References**:**shell wrappers for trig and other mathematical functions***From:*Dan Hitt <dan.hitt@gmail.com>

**Re: shell wrappers for trig and other mathematical functions***From:*David Christensen <dpchrist@holgerdanske.com>

**Re: shell wrappers for trig and other mathematical functions***From:*Dan Hitt <dan.hitt@gmail.com>

- Prev by Date:
**Re: Debian Installer, Manual Partitioning is a Joke** - Next by Date:
**Re: Authentication for telnet.** - Previous by thread:
**Re: shell wrappers for trig and other mathematical functions** - Next by thread:
**Re: shell wrappers for trig and other mathematical functions** - Index(es):