$linuxcli.in _    [commands]    [tips & tricks]    [manpage]    [ESXi CLi]    [what is my ip?]    [pingme!]    [BIOS lock code]    [Code repo]


Know line end with space


In some text file or any configuration file might end with space and to know that below command would be useful.

cat -E file.txt

With above command you will know the last character in a line there is space or not. If there is a space character at end of line then you will find space character before dollar sign $ at the end of the line.

For example:

user@hostname$ cat -E file.txt
Hello World$
Engine start with a sound $
Light is speedier than sound.$
$

Last updated on 30 June 2023 10:43 am IST