Use xargs instead of tr to detect empty list