optimize linux command | class structure