On Fri, Sep 24, 2010 at 03:22, Marc Herbert marc.herb...@gmail.com wrote:
On Thu, Sep 23, 2010 at 04:38:42PM -0500, Michael Witten wrote:
This is also possible:
[ -f $file ] do_something
Note that this style is not compatible with set -e
I was going to note that same caveat in my
On Thu, Sep 23, 2010 at 04:38:42PM -0500, Michael Witten wrote:
On Mon, Aug 23, 2010 at 16:40, Eric Blake ebl...@redhat.com wrote:
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.
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
Chris F.A. Johnson wrote:
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
On Tue, Aug 24, 2010 at 10:25 AM, Joachim Schmitz
nospam.j...@schmitz-digital.de wrote:
Chris F.A. Johnson wrote:
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
Pierre Gaston wrote:
On Tue, Aug 24, 2010 at 10:25 AM, Joachim Schmitz
nospam.j...@schmitz-digital.de wrote:
Chris F.A. Johnson wrote:
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
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,
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
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