TECHIES WORLD

For Techs.... Techniques.... Technologies....

CpanelLinux

How to delete last character of a string in Linux

To delete the last character of a string, we can use the following command.

echo "${Q%?}"

Here Q is the string to be modified

Leave a Reply