cogiz / maincopy

rip main movie from DVD, extract video, audio, subtitles, then requantize video. Put everything back together again on a 4.7gb blank DVD disc.
0 stars 0 forks source link

Suggested improvements #1

Open neurobin opened 8 years ago

neurobin commented 8 years ago
  1. Double quote your variables, specially those which contain paths to prevent globbing, and word splitting.
  2. use bash specific [[ instead of single [. It gives improved security against word splitting and works well with empty strings.
  3. 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...

cogiz commented 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:

  1. Double quote your variables, specially those which contain paths to prevent globbing, and word splitting.
  2. use bash specific [[ instead of single [. It gives improved security against word splitting and works well with empty strings.
  3. 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.