use shell function instead of != operator