from man bash, to define a function use;
function name compound-command
OR
name () compound-command
right?
And Compound Commands are:
( list)
{ list; )
(( expression ))
[[ expression ]]
...et al
so why do I get a syntax error for
function good_dir [[ -n $1 -d $1 -r $1 -x $1
Yi Yan wrote:
Hi,
I used the following Bash script to test substring replacement operator.
It is performance get worse very quickly with the increasing of the string
length.
I test the script with Bash(4.1) on Debian Linux machine.
See the execution time difference by
Hi,
I have some filenames that have the character ^J. I can not figure out
a way to input such a character. Does anybody know if it is possible
to input ^J?
--
Regards,
Peng
Peng Yu wrote:
I have some filenames that have the character ^J. I can not figure out
a way to input such a character. Does anybody know if it is possible
to input ^J?
Several ways. One is you can quote the characters verbatim with C-v
before the character. As in C-v C-j. (A.K.A. ^v ^j) But
Lastly since ^J is a newline you can generate one with echo \n.
That does not work in bash-4.x. Firstly, by default the bash builtin
'echo' supplies a trailing newline. Secondly, backslash translation
requires the option -e.
$ echo \n
\n
$ echo \n | od -c
000 \ n \n
003
$
What
On Mon, Jul 19, 2010 at 2:53 AM, Linda Walsh b...@tlinx.org wrote:
from man bash, to define a function use;
function name compound-command
OR
name () compound-command
right?
And Compound Commands are:
( list)
{ list; )
(( expression ))
[[ expression ]]
...et al
so why
The curly brackets are suposed to be optional.
They are line 2 of the Compound commands list below...
Clark J. Wang wrote:
On Mon, Jul 19, 2010 at 2:53 AM, Linda Walsh b...@tlinx.org
mailto:b...@tlinx.org wrote:
from man bash, to define a function use;
function name