10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear Masters,
I want to remove all lines with blank spaces
input file:
a|abc|0|1
a|abc|2|3
b||3|5
c|def||7
d|def|0|1
Expected:
a|abc|0|1
a|abc|2|3
d|def|0|1
I did this
awk -F'|' '!/^$/' input (4 Replies)
Discussion started by: radius
4 Replies
2. Shell Programming and Scripting
Gents,
Please can you help me.. to remove blank spaces :)
Input
ABSOLUTE , ,FALSE ,1035 ,28 ,669 ,1817.0 ,CORREL BEFORE ,1
ABSOLUTE , ,FALSE ,1035 ,28 ,686 ,1817.0 ,CORREL BEFORE ,1
ABSOLUTE , ,FALSE ,1035 ,28 ,670 ,1819.0 ,CORREL BEFORE ,1
ABSOLUTE , ,FALSE ... (4 Replies)
Discussion started by: jiam912
4 Replies
3. Shell Programming and Scripting
I have a file which contains data such as that shown below. How do i remove all the blcnak spaces, before, during and at the end of each line in one command?
300015, 58.0823212, 230.424728
300016, 58.2276459, 229.141602
300017, 58.7590027, 226.960846
... (9 Replies)
Discussion started by: carlr
9 Replies
4. Shell Programming and Scripting
Hi
I have a file
1 xyz 456
1 xyz 456
1 xyz 456
2 abc 8459
3 gfd 657
4 ghf 658
4 ghf 658
I want the output
1 xyz 456
2 abc 8459
3 gfd 657
4 ghf 658 (3 Replies)
Discussion started by: manigrover
3 Replies
5. Shell Programming and Scripting
Hi
I have a file
12m 345693460
12 1234
12 1234
34 345
34 345
And I want output fiel as
12m 345693460
12 1234
34 345
hw can it be done
Thanks (1 Reply)
Discussion started by: manigrover
1 Replies
6. Shell Programming and Scripting
Hi
I have a file with following entries
122 N/A
123 5654656
123423 43534543
4544 45435
435454 N/A
i Have to remove entries with N/A so that only
123 5654656
123423 43534543
4544 45435
remain in output file
can anybody guide for a code/unix/perl (2 Replies)
Discussion started by: manigrover
2 Replies
7. Shell Programming and Scripting
Hi
I have a file like this
1234
2345
567889
567889
2345
234899420
83743
2345
67890
67890
................
so on
I want to delete entries which are more than once like 2345, 567889 and 67890 so that these appear once (4 Replies)
Discussion started by: manigrover
4 Replies
8. Shell Programming and Scripting
Hi
I have a file with numerous entries some entries are
1 mani
2 kavya
3 N/A
4 Praveeen
5 N/A
and so on
How to remove entries with N/A so the result will be
1 mani
2 kavya
3 Praveeen (6 Replies)
Discussion started by: manigrover
6 Replies
9. Shell Programming and Scripting
hi
i have a file which store some data.the contents of my file is
data1:data2
data3:data4
i have a script which read this file
correct="$(cat /root/sh | cut -d: -f1)"
i used this syntax..please help me which syntax is used to remove blank spaces..then how to read this file.. (1 Reply)
Discussion started by: shubhig15
1 Replies
10. Shell Programming and Scripting
can any help how to remove blank spaces in a string?
STR="GOOD BYE"
by removing blank spaces, the string should be GOOD,BYE
thanks in advance (2 Replies)
Discussion started by: spandu
2 Replies