title: BASH how do I check if numeric permissions passed as argument are a valid combination?
body: <p>I have a script that reads a set of numeric file permissions as argument it works like this:</p>
  
  <p>$ bash script 755</p>
  
  <p>This will give 755 permissions to some file on the disk. I want to know how to check if the number passed as parameter contains a valid set of permissions. Any ideas?</p>
  
  <p>thanks</p>