SyntaxFix
Write A Post
Hire A Developer
Questions
The tools sed or tr will do this for you by swapping the whitespace for nothing
sed
tr
sed 's/ //g'
tr -d ' '
Example:
$ echo " 3918912k " | sed 's/ //g' 3918912k