this is my code, the test.txt file contains more empty lines and empty space separately from the tab, I want to delete this empty space and empty lines, but I need empty lines before running st^ , how to do this?
sed "s/^[ ]*//" -i test.txt cat $2 > /tmp/tt.txt sed '/^$/d' test.txt > /tmp/tt.txt echo " " >> test.txt echo " " >> /tmp/tt.txt mv /tmp/tt.txt test.txt
iam gets output like
st^flower p^rose p^jasmine st^animals p^bear p^elephant
I need a conclusion like
st^flower p^rose p^jasmine st^animals p^bear p^elephant
source share