У меня есть несколько строк кода, как показано ниже:
bash-3.2$ cat remove_space.txt
this is firs line with 2-3 spaces
2nd line with more space, this is where the issue is.
3rd line
Я могу подавить начальные пробелы в начале каждой строки, но не во 2-й строке.Я не понимаю, почему sed
терпит неудачу там.
bash-3.2$ sed 's/^ *//g' remove_space.txt
this is firs line with 2-3 spaces
2nd line with more space, this is where the issue is.
3rd line
bash-3.2$
Обновление
with `-vte`
bash-3.2$ cat -vte remove_space.txt
this is firs line with 2-3 spaces$
^I^I^I^I2nd line with more space, this is where the issue is.$
3rd line $
$
$
bash-3.2$
Любая помощь с благодарностью.