This topic has been archived. It cannot be replied.
-
工作学习 / IT杂谈 / how to easily delete the empty lines in a text file under unix shell script and how to get the date of yesterday? Thanks
-oceandeep(北极熊® Zzz Zzz);
2002-12-11
(#906807@0)
-
1. sed -e "s/^$//" file.txt (iirc) 2. Depending on the OS. Different OSes have slightly different 'date' command.
-dennis2(Dennis);
2002-12-11
(#907550@0)
-
that's stupid. it doesn't work. use grep -v
-hairypotter(HP);
2002-12-15
(#915335@0)
-
1 sed "/^$/d" input.txt
2
-xiagangle(xiagangle);
2002-12-11
{753}
(#907794@0)
-
2.TZ=28; date
-artichoke(artichoke);
2002-12-11
(#907800@0)
-
Thank you so much 2 guys. I will try it tomorrow
-oceandeep(北极熊® Zzz Zzz);
2002-12-11
(#907807@0)