I have this list
111
222
333
444
555
I want to print each line to have 2 coupled args, like this:
111 222
222 333
333 444
444 555
555
Is there a way to do this with xargs? or any single liner command (performance is important)
thanks
>Solution :
awk seems more appropriate than xargs:
$ awk 'NR>1 {print prev, $0} {prev=$0} END {print prev}' file.txt
111 222
222 333
333 444
444 555
555