Open neurobin opened 8 years ago
Thank you very much for the advice. I am teaching myself and any and all help is greatly appreciated.
cogiz/steve sullivan wstevesullivan@gmail.com
On 26 December 2015 at 16:45, Md Jahidul Hamid notifications@github.com wrote:
- Double quote your variables, specially those which contain paths to prevent globbing, and word splitting.
- use bash specific [[ instead of single [. It gives improved security against word splitting and works well with empty strings.
- Always check sanity of your variables, otherwise a wrong value can cause drastic damage to the users. For example if $name is empty then rm -R -f /home/cogiz/DVD/$name will delete the DVD folder instead.
Regards, Jahid...
— Reply to this email directly or view it on GitHub https://github.com/cogiz/maincopy/issues/1.
[[
instead of single[
. It gives improved security against word splitting and works well with empty strings.$name
is empty thenrm -R -f /home/cogiz/DVD/$name
will delete the DVD folder instead.Regards, Jahid...