Bash – $(( )) vs. $[]
Gene Heskett
gheskett at wdtv.com
Wed Dec 5 21:19:21 UTC 2012
On Wednesday 05 December 2012 16:14:25 Steve Flynn did opine:
> On 5 December 2012 19:54, Gene Heskett <gheskett at wdtv.com> wrote:
> > It may not be so 'user-friendly' but its the sharpest swiss army knife
> > we have. Much of the automation in mail handling is from bash
> > scripts I wrote.
>
> zsh for the win!
>
> > Likewise, I am keeping a local repo for an legacy computer here, and
> > as I code its handy to have a printer for hard copies of my assembly
> > drivel.
> >
> > There are NO printers for sale today that a TRS-80 Color Computer can
> > drive with its pure text listing output. So I have a ser-usb on that
> > port, send it up the cable to this machine, which then feeds it thru
> > cups and back to a $110 B&W Brother laser printer on that machines
> > desk in the basement.
> >
> > Its absolutely the best looking output that machine has ever had, and
> > at 22 pages a minute, easily 40x faster than its next best lashup,
> > which was a xerox 1650-ro, a 40 cps daisy wheel I can't get one time
> > ribbons for anymore, they are too old & shatter like glass on the
> > first hammer strike.
> >
> > If I had to write all that in C and build it, I probably could, but
> > bash gets the job done while I am writing an outline framework for
> > the C version. Maybe its slow, but slow is relative on a quad core
> > phenom. :)
> >
> > The longest delay is the drum warmup in the printer, about 4 or 5
> > seconds. Whats not to like?
>
> Eh? We're talking about shall A versus shell B. You're on about
> printers. Is there some connection I've missed?
No, I was just relating how easy it was to do with a bash script, running
as a daemon on this machine. The printer wasn't intended to be the star,
the bash script that made it possible is the star. Nowadays, there is a
java .jar in series with the path the data travels and its about 15x
faster, but the end result is the same. Beautiful assembly language
listing hardcopy.
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
"The fundamental principle of science, the definition almost, is this: the
sole test of the validity of any idea is experiment."
-- Richard P. Feynman
I was taught to respect my elders, but its getting
harder and harder to find any...
More information about the ubuntu-users
mailing list