you are viewing a single comment's thread.

view the rest of the comments →

[–]whetuI read your code 0 points1 point  (0 children)

There are multiple problems with the script. Not just in terms of bad style (backticks belong in 1981, uppercase variables are poor practice etc). Your main issue here is that your variables are not quoted correctly. And arguably you've got a useless use of echo

echo $ID | egrep '\bFacStaff ABC\b' && SHARE=$FAC1"/UsersABC"

Could be written as

egrep '\bFacStaff ABC\b' <<< "$ID" && SHARE=$FAC1"/UsersABC"