Saves in 'result' variable list of groups which user $line belongs to, and not matching pattern "_unknown|sciences|everyone|netaccounts"
result=$(groups "$line" | sed 's/ /\n/g' | egrep -v "_unknown|sciences|everyone|netaccounts")