How Do You Escape Space in Linux?
Contents What Is the Command to Remove Space in Linux? Use Sed ‘S/^ *//G’, to Remove the Leading White Spaces. There Is Another Way to Remove Whitespaces Using...
Contents
What is the command to remove space in Linux?
Use sed ‘s/^ *//g’, to remove the leading white spaces. There is another way to remove whitespaces using `sed` command. The following commands removed the spaces from the variable, $Var by using `sed` command and [[:space:]].
Must Read
How do you escape the space characters?
You can also add a backslash before whitespace characters such as space, tab, newline and formfeed. However, it is cleaner to use one of the easily readable escape sequences, such as ‘ t ‘ or ‘ s ‘, instead of an actual whitespace character such as a tab or a space.