bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash style of if-then-else?


From: Peng Yu
Subject: Bash style of if-then-else?
Date: Mon, 23 Aug 2010 16:29:16 -0500

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,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]