added print sort by attribute method in CLI