linux head command get 2nd line code example Example: linux head command get 2nd line head -2 file | tail -1