Tag: output
-
Awk: Remove everything after the first word in each line
Another awk question. How to remove everything after the first word in each line? E.g., if we wanted to remove everything but the names in this input (FILENAME.txt): Anna 123 09123 Main Street Bob 109 09800 Smith Street Joe 0981 123123 King Street We can use awk like so: awk ‘{…
-
Ubuntu: Clear terminal screen
Sometimes you may wish to clear the terminal window, whether it be to hide what you’ve just done, clear some irrelevant/distracting output or any other reason. The best command to do this is simple: reset This completely clears the output shown in your terminal window but doesn’t log you out. If you…