Have you actually tried the code? The reason you gave that it won't work is nonsense since .echo -q stops it echoing anything.