Remove or replace all characters after character X

ls | sed -e ‘s/X.*//’    (remove)

ls | sed -e ‘s/X.*/Y/’ (replace with Y)

This entry was posted in Linux and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *