#!/bin/bash cat nowcoder.txt | awk 'BEGIN{ORS=" "}{print $1}' cat nowcoder.txt | awk 'BEGIN{ORS=" "}{print $2}'