Posted in Command Line, Linux Delete Leading Whitespace Using Sed Binny V A May 12, 2009 Leave a Comment on Delete Leading Whitespace Using Sed Delete leading whitespace (spaces/tabs/etc) from beginning of each line. Same as yesterday’s command – but using sed cat file.txt | sed -e 's,^ *,,' Credit: Vivin Author: Binny V AA philosopher programmer who specializes in backend development and stoicism.