1. 공백 라인 제거
grep -ve '^ *$' from.txt > to.txt

2. 첫 글자까지의 공백 제거
sed 's/^ *//' from.txt > to.txt

또는 리다이렉션 대신 sed -i 옵션 사용 

Posted by ryu2811