I have a file.txt which seems like having three lines.
wc -l file.txt
3 file.txt
In fact, once it is open in text editor, this file has four lines where the last line is empty. how can i delete this last empty line of the file.txt? I tried the codes below so far but they did not work.
There is no need to redirect every output into a file. Just issue the awk line I posted and post the result here, thanks.
As said try another editor but notepad++. Maybe that is not the best choice for an editor to use (if you are allowed to use any other).