delete 2 characters from the end

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

delete 2 characters from the end

Ganesh
Hi
  I have a file in which I want to remove 2 characters from the end. How to do it?


$ cat inpfile
aaaaa
bbbbb
ccccc

 I tried this, but not working.


$ sed 's/$..//' inpfile
Reply | Threaded
Open this post in threaded view
|

Re: delete 2 characters from the end

Guru
Administrator


sed 's/..$//' inpfile