10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am trying to remove everything coming after empty line under ubuntu14.04.
How may I do it?
file:
aaa
020390
bb00id3
c03wisi
209dl
x092sia
0290s
I expect:
aaa
020390
bb00id3
c03wisi (3 Replies)
Discussion started by: baris35
3 Replies
2. Shell Programming and Scripting
Hi All,
I have a file.txt which seems like having three lines.
wc -l file.txt
3 file.txt
In fact, once it is open in text editor, this file has four lines where the last line is empty. how can i delete this last empty line of the file.txt? I tried the codes below so far but they... (6 Replies)
Discussion started by: senayasma
6 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies
4. Shell Programming and Scripting
Hi
What I'm trying to do is delete every blank line upto a certain number, so for instance I only want to delete the first 4 empty lines within a file, I know how to delete every line with:
sed '/^$/d'
But I can't figure out how to limit it to only the first 4 occourances
I though it... (5 Replies)
Discussion started by: duonut
5 Replies
5. Shell Programming and Scripting
hi,
I'd like to ask you if you can help me with such surely easy thing - I have some data and need to plot them. I have txt of data in two columns, tab separated, but some second columns are empty. like
1```` 2
1.2``
3```` 2
4.44`
5`````
6.1```1
how can I erase all the lines... (2 Replies)
Discussion started by: bsco
2 Replies
6. UNIX for Dummies Questions & Answers
I have to remove character " in file which occurs at every line and have to delete empty spaces. Please help (2 Replies)
Discussion started by: vikram2008
2 Replies
7. UNIX for Advanced & Expert Users
abc#
abc#this is a test
abc#this is a test to delete
abc#
xyz#
xyz#this is a test two
xyz#
In the above example '#' is common. How to do delete the emply lines. In specific to observe the output as:
abc#this is a test
abc#this is a test to delete
xyz#this is a test two
.
.
.
. (5 Replies)
Discussion started by: Aejaz
5 Replies
8. Shell Programming and Scripting
Hi,
I have an dir which has 50K file, some of them are empty. I want to delete the empty file from the dir. I am planning to use the following command.
ls -l | grep " 0 " | awk '{print $9}'
I can copy this to an file and then how do I use this file to delete the empty files.... Any help... (2 Replies)
Discussion started by: Script40
2 Replies
9. Shell Programming and Scripting
Hi,
I need to delete the lines with empty name.
What is the best way to do it?
Thanks a lot for your help!
EMID MMDDYY HOURS JOB EMNAME
0241 051605 11.40 52062 someone
0520 051605 10.63 52062
0520 051605 10.66 52062
0520 051605 10.65 52062 (3 Replies)
Discussion started by: whatisthis
3 Replies
10. UNIX for Dummies Questions & Answers
How will you list only the empty lines in a file (using grep) (1 Reply)
Discussion started by: JosephGerard
1 Replies