10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Please help me on this
My script name is uniqueArray.csh
#!/bin/csh
set ARRAY = ( one teo three one three )
set ARRAY = ( $ARRAY one five three five )
How to remove the duplicates in this array ,sort and save those in the same variable or different variable.
Thanks in the advance
... (3 Replies)
Discussion started by: SA_Palani
3 Replies
2. Shell Programming and Scripting
Hi All,
My name is Prathyu and I am working as a ETL develper. I have one requirement to create a XML file based on the provided XSD file. As per the Datastage standards Key(repeatable) field does not contain any Null values so I am inserting some dummy tag line to that XML file.
... (14 Replies)
Discussion started by: Prathyu
14 Replies
3. UNIX for Dummies Questions & Answers
I have a file called FILE
cat FILE
11/11/2012
11/11/2012
12/11/2012
15/11/2012
need to remove the duplicates dates ( ie 11/11/2012 is present two times i need remove one duplicates date )
Need outputs like this
11/11/2012
12/11/2012
15/11/2012
I have tried using awk... (8 Replies)
Discussion started by: Venkatesh1
8 Replies
4. UNIX for Dummies Questions & Answers
Hello experts!
I'd like a way to remove duplicates per line. Strings are enclosed in brackets, and I would prefer to maintain the order of the file:
example input
(56)(63)
(56)(70)(56)(70)(24)
(25)(78)
(12)(33)(12)
(10)
(10)
desired output
(56)(63)
(56)(70)(24)
(25)(78)... (5 Replies)
Discussion started by: torchij
5 Replies
5. Shell Programming and Scripting
I have existing XML file as below, now based on input string in shell script on workordercode i need to create a seprate xml file
for e.g if we pass the input string as 184851 then it find the tag data from <workOrder>..</workOrder> and write to a new file and similarly next time if i pass the... (3 Replies)
Discussion started by: balrajg
3 Replies
6. Shell Programming and Scripting
Hi
I need a script that removes the duplicate records and write it to a new file
for example I have a file named test.txt and it looks like
abcd.23
abcd.24
abcd.25
qwer.25
qwer.26
qwer.98
I want to pick only $1 and compare with the next record and the output should be
abcd.23... (6 Replies)
Discussion started by: antointoronto
6 Replies
7. Shell Programming and Scripting
Can some one provide me a shell script.
I have file with many columns and many rows. need to sort the first column and then remove the duplicates records if exists.. finally print the full data with first coulm as unique.
Sort BASED ON FIRST FIELD and remove the duplicates if exists... (2 Replies)
Discussion started by: tuffEnuff
2 Replies
8. Shell Programming and Scripting
Input:
a
b
b
c
d
d
I need:
a
c
I know how to get this (the lines that have duplicates) :
b
d
sort file | uniq -d
But i need opossite of this. I have searched the forum and other places as well, but have found solution for everything except this variant of the problem. (3 Replies)
Discussion started by: necroman08
3 Replies
9. Shell Programming and Scripting
hi,,
i hav a file with many lines.i need to remove all lines before a line begginning with a specific pattern from the file because these lines are not required.
Can u help me out with either a perl script or shell script
example:-
if file initially contains lines:
a
b
c
d
.1.2
d
e
f... (2 Replies)
Discussion started by: raksha.s
2 Replies
10. Shell Programming and Scripting
Hi gurus,
I have this file with blank lines in it.
How do i remove them in shell?
I tried these commands but not working:
sed '/^ *$/d'
or
sed '/^$/d'
Anybody has a better idea pls?
Also there are lines which starts with a single space, how do we remove the space in those lines?... (3 Replies)
Discussion started by: gholdbhurg
3 Replies