On Mon, 23 Aug 2010, Dennis Williamson wrote:
If you're writing a Bash-specific script then it's preferable to use
double square brackets (see http://mywiki.wooledge.org/BashFAQ/031).
if [[ -f $file ]]
then
do something
fi
I'd avoid non-portable syntax unless it offers a significant
Is it possible to "C-xC-e" /without/ immediately executing the resulting
command?
To my mind, "editing" the buffer and "executing" it are two different
things -- the latter having potentially dire consequences...
I'd prefer it if, after exiting my $EDITOR, bash simply stuffed the
results bac
Hi,
I am the maintainer of bash in MacPorts, a package management system for
Mac OS X. I am currently debugging crashes with bash 4.1.7 when being
run as a login shell under certain conditions. The original report was
here: http://trac.macports.org/ticket/25693
Configuration Information [Automat
Hi,
I am the maintainer of bash in MacPorts, a package management system for
Mac OS X. I am currently debugging crashes with bash 4.1.7 when being
run as a login shell under certain conditions. The original report was
here: http://trac.macports.org/ticket/25693
Configuration Information [Automat
If you're writing a Bash-specific script then it's preferable to use
double square brackets (see http://mywiki.wooledge.org/BashFAQ/031).
if [[ -f $file ]]
then
do something
fi
I prefer forms using the fewest number of semicolons, but I really
don't think it matters. Consistency is more impor
On 08/23/2010 03:29 PM, Peng Yu wrote:
Hi,
I'm wondering if there is a widely accepted coding style of bash scripts.
lug.fh-swf.de/vim/vim-bash/StyleGuideShell.en.pdf
I've seen the following style. Which is one is more widely accepted?
if [ -f $file]; then
do something
fi
if [ -f $file];
Hi,
I'm wondering if there is a widely accepted coding style of bash scripts.
lug.fh-swf.de/vim/vim-bash/StyleGuideShell.en.pdf
I've seen the following style. Which is one is more widely accepted?
if [ -f $file]; then
do something
fi
if [ -f $file];
then
do something
fi
--
Regards,
Pen