Hi All,
below is my data file
file.txt
$$0 ServerA LAN1 AAA IT01 04/30/2008 09:16:26
$$0 ServerB LAN1 AAA IT02 04/30/2008 09:16:26
here $ is a blank space
how to delete first 2 blank spaces in a file.
Hi All,
below is my data file
file.txt
$$0 ServerA LAN1 AAA IT01 04/30/2008 09:16:26
$$0 ServerB LAN1 AAA IT02 04/30/2008 09:16:26
here $ is a blank space
how to delete first 2 blank spaces in a file.
sed -e 's/^ //' file.txt>file.new
using Perl:
perl -pi -e 's/^\s+//' filename
sed -e 's/^ //g' filename > newfile
Thanks
The "-e" and the "g" is redundant, he only wants to delete the first 2 spaces.
The "-e" is for combining multiple commands and the "g" is for global (more) substitutes on a line, this is sufficient:
sed 's/^ //' filename > newfile
Regards