File1
Sergio Lionel Luis Andreas Gerard
I want my stdout to have just
Sergio Gerard
How can I do this using the tail command and piping?
This should do the trick:
$ head -n 1 File1; tail -n 1 File1
With sed:
sed
sed -n -e '1p;$p' File1