I am trying to delete last row in the file generated by nzsql.Please find the below query.
nzsql -A -c "SELECT * FROM AM_MAS_DIVISION_DIM" > abc.out
When I execute this query the output will be generated and stored in abc.out.This will include both header columns as well as some time information at the bottom.But I don’t need the bottom metadata and want to keep only my header columns. How can I do this using only nzsql.Please help me.Thanks in advance.
Why don’t you just pipe the output to a unix command to remove it? I think something like this will work:
Seems to be a recommended solution for getting rid of the last line (although ed, gawk, and other tools can handle it).