ash continues to amaze me. I saw &( ... ) in use once and had to
call my unix geek friends to find out how that could possibly work.
~ Ward Cunningham
Never mind how it works, what does it do?
Can't Google for punctuation, not in the Bash references I searched, the thread about web searching for punctuation
isn't findable via search engine.
So it's up to Plug and its repository of knowledge.
--
Michael Rasmussen, Portland Oregon
Other Adventures: http://www.jamhome.us/ or http://westy.saunter.us/
Fortune Cookie Fortune du jour:
It's better to be hated for what you are than to be loved for what you're not.
~ Marilyn Monroe
geez, i really wanted to be the one to answer this. I've never used
the ampersand that way, and i though maybe (due to your quote) that it
was ash-specific, but no dice (thought the ash man page may be my new
sweetheart, it's less than 1/3 the length of bash(1) and is extremely
concise everywhere & is mentioned at least =))
but the best answer i found was from wikipedia, which merely expounded
upon the possibilities while maddeningly not expanding:
" In Bash, the ampersand can separate words, control the command
history, duplicate file descriptors, perform logical operations,
control jobs, and participate in Regular expressions. "
( http://en.wikipedia.org/wiki/Ampersand )
Sorry to frustrate you with my sloppy cut and paste and brain addled proofeading.
That should read:
Bash continues to amaze me.
I know what & does in the general sense, and I suspect that &(...) forks of
some processes from within a script.
But
I don't _know_ what that does. Lack of punctuation based searching in impeing my efforts to look it up.
Having had to work last night (jobs are useful but sometimes ...) prevente me from experimenting.
So I asked.
--
Michael Rasmussen, Portland Oregon
Other Adventures: http://www.jamhome.us/ or http://westy.saunter.us/
Fortune Cookie Fortune du jour:
I believe if more college student used this [study tips] site,
their would defiantly be more success in community colleges.
~ http://shitmystudentswrite.tumblr.com/page/10 (at least now)
knowing virtually nothing about bash, I searched the Bash Reference
Manual. I got 80 hits for & ; none for &( . Does this apply? (I can
say that the Bash Reference Manual is as opaque as Bash itself.)
HISTIGNORE
A colon-separated list of patterns used to decide which command lines
should be saved on the history list. Each pattern is anchored at the
beginning of the line and must match the complete line (no implicit
=91*=92 is appended). Each pattern is tested against the line after the
checks specified by HISTCONTROL are applied. In addition to the normal
shell pattern matching characters, =91&=92 matches the previous history
line. =91&=92 may be escaped using a backslash; the backslash is removed
before attempting a match. The second and subsequent lines of a
multi-line compound command are not tested, and are added to the
history regardless of the value of HISTIGNORE.
HISTIGNORE subsumes the function of HISTCONTROL. A pattern of =91&=92 is
identical to ignoredups, and a pattern of =91[ ]*=92 is identical to
ignorespace. Combining these two patterns, separating them with a
colon, provides the functionality of ignoreboth.
-Denis
I'd be curious to see this in the larger context? "&" be used as a control
character among other uses. There does exist the command ((...))
--enable-dparen-arithmeticInclude support for the ((...)) command (see
Conditional
Constructs< http://www.gnu.org/software/bash/manual/bashref.html#Conditi[..] >
).
Single parens usually denote an expression "(value)" with a used in a test
utility. But the "..." is what really throws me. This is generally used as
valuen).
Whatever the command syntax does, it seems to not be very highly
referenced...
Mike
Hello from Alaska
Given the ((...)),
the dot-dot-dot represents an algebraic type math expression.
Remove quotes in expressions below.
Normally you can't have an expression in bash of the sort "a*5%3" (e.g. a
times 5 modulo 3).
An alternate form is "let b=a/3"
Look for "let" under Bash built-ins in the referenced Bash manual.
This lets you not have to use "expr" for computations.
--
-- Bill Morita
PLUG mailing list
PLUG*******/mailman/listinfo/plug
# from Michael Rasmussen
# on Thursday 16 February 2012 05:38:
Not exactly. If I'm reading correctly, there is not any special
construct '&(...)' -- it just backgrounds the commands before the & and
runs a subshell of the () part. It's the same thing as '& (...)'
c.f. '; (...)', which seems not as interesting as '$(...)', '<(...)',
or '>(...)' I think.
http://www.gnu.org/software/bash/manual/bashref.html#Command[..]
http://www.gnu.org/software/bash/manual/bashref.html#Shell-E[..]
I did run across coproc while reading though and now need to find a
chance to use that.
--Eric
--
Any sufficiently advanced incompetence is indistinguishable from malice.
--The Napoleon-Clarke Law
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------