Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
blank lines and sed
Name: alrinno Date: July 15, 2008 at 23:15:31 Pacific OS: UNIX CPU/Ram: N/A Product: Any
Comment:
----------------------
hello,
i have tried to remove blank lines from a file using korn shell script file.. it doesn't seem to work!
i tried sed '/^\s*$/d' infile > outfile but that didn't work i tried sed 's/ *$//;/^$/d' infile > outfile and that didn't work i tried sed '/^s./d' infile > outfile and that didn't work
what can i do? this is a huge file and some blank lines might be spaces? or tabs? how can i know?
Summary: Here are both awk and sed solutions to eliminate blank lines within a certain range of lines. Both of these use the /from/,/to/ range of lines construct. And for both, a range begins with a /from/ l...
Summary: Hi All, I want to remove blank lines from a file. I want to compare two files without comments. I have tried this, cut -f1 -d'#' filename > noComments.txt This saves a file without comments but ...