i have a file test.txt.
when i vi the file it looks like:
test.txt:
This is a test
This is a 2nd test
when i run the following command in vi: “set list” – it shows a number of hidden characters “$ and ^M”:
Test.txt:
This is a test$
This is a 2nd test^M
i can run the following command to get rid of “^M”
:%s/^M//g (actioning CTRL-V to initiate “^” and CTRL-M to initiate “M” – to complete ^M when typing out the replace string :%s/^M//g)
this works great for the ^M hidden character replacement.
I just for the life of me do not know how to generate the hidden $ character when running my substitute command in vi.
:%s/?//g is what im trying to create.
in vi my command to remove ^M
:%s/^M//g to obtain ^M in you substitute command i entered [CTRL-v] + [CTRL-M]
this worked for removing ^M.
how do i run the same command to include a removal of the hidden character $?